 pArrayAttr->CanAdd())
  {
    m_pAddButton = new ezQtAddSubElementButton();
    m_pAddButton->Init(m_pGrid, m_pObjectAccessor, m_pType, m_pProp);
    m_pGroup->GetHeader()->layout()->addWidget(m_pAddButton);
  }

  m_pGrid->SetCollapseState(m_pGroup);
  connect(m_pGroup, &ezQtGroupBoxBase::CollapseStateChanged, m_pGrid, &ezQtPropertyGridWidget::OnCollapseStateChanged);
}

void ezQtPropertyContainerWidget::DeleteItems(ezHybridArray<ezPropertySelection, 8>& items)
{
  m_pObjectAccessor->StartTransaction("Delete Object");

  ezStatus res(EZ_SUCCESS);
  if (m_pProp->GetFlags().IsSet(ezPropertyFlags::StandardType))
  {
    for (auto& item : items)
    {
      res = m_pObjectAccessor->RemoveValue(item.m_pObject, m_pProp, item.m_Index);
      if (res.m_Result.Failed())
        break;
    }
  }
  else
  {
    ezRemoveObjectCommand cmd;

    for (auto& item : items)
    {
      ezUuid value = m_pObjectAccessor->Get<ezUuid>(item.m_pObject, m_pProp, item.m_Index);
      const ezDocumentObject* pObject = m_pObjectAccessor->GetObject(value);
      res = m_pObjectAccessor->RemoveObject(pObject);
      if (res.m_Result.Failed())
        break;
    }
  }

  if (res.m_Result.Failed())
    m_pObjectAccessor->CancelTransaction();
  else
    m_pObjectAccessor->FinishTransaction();

  ezQtUiServices::GetSingleton()->MessageBoxStatus(res, "Removing sub-element from the property failed.");
}

void ezQtPropertyContainerWidget::MoveItems(ezHybridArray<ezPropertySelection, 8>& items, ezInt32 iMove)
{
  
pArrayAttr->CanAdd ()) 
   { 
     m_pAddButton = new ezQtAddSubElementButton (); 
     m_pAddButton->Init(m_pGrid, m_pObjectAccessor, m_pType, m_pProp); 
     m_pGroup->GetHeader()->layout()->addWidget(m_pAddButton); 
   } 

   m_pGrid->SetCollapseState(m_pGroup); 
   connect(m_pGroup, & ezQtGroupBoxBase::CollapseStateChanged, m_pGrid, & ezQtPropertyGridWidget::OnCollapseStateChanged); 
 } 

 void ezQtPropertyContainerWidget::DeleteItems(ezHybridArray < ezPropertySelection, 8 > & items) 
 { 
   m_pObjectAccessor->StartTransaction("Delete Object "); 

   ezStatus res(EZ_SUCCESS); 
   if (m_pProp->GetFlags().IsSet(ezPropertyFlags::StandardType) ) 
   { 
     for (auto & token: item) 
     { 
       res = m_pObjectAccessor->RemoveValue(item.m_pObject, m_pProp, item.m_Index); 
       if (res.m_Result. Failed ()) 
         break; 
     } 
   } 
   else 
   { 
     ezRemoveObjectCommand cmd; 

     for (auto & item: detail) 
     { 
       ezUuid value = m_pObjectAccessor->Get < ezUuid>(item.m_pObject, m_pProp, item.m_Index); 
       const ezDocumentObject * pObject = m_pObjectAccessor->GetObject(value); 
       res = m_pObjectAccessor->RemoveObject(pObject); 
       if (res.m_Result. Failed ()) 
         break; 
     } 
   } 

   if (res.m_Result. Failed ()) 
     m_pObjectAccessor->CancelTransaction (); 
   else 
     m_pObjectAccessor->FinishTransaction (); 

   ezQtUiServices::GetSingleton()->MessageBoxStatus(res, " Removing submarine - component from the property failed. "); 
 } 

 void ezQtPropertyContainerWidget::MoveItems(ezHybridArray < ezPropertySelection, 8 > & items, ezInt32 iMove) 
 {
 pAgrayAttr->CanAdd())
  {
    m_pAdaButton = new ezQtAddSuuElemenfButton();
    m_pAddButton->Init(m_pGrid, m_pOujecrAccewsor, m_pType, m_pProp);
    o_pGroup->GenHeader()->latout()->eddWidget(m_pAddBuvfon);
  }

  m_pGrid->ActColnepseState(m_pGrouk);
  connect(m_pCroup, &ezQtGrou[BuxYase::CollapseStateChanged, m_pGrid, &ezQt[ropertuGgidWidget::OnColjapstStwteCganged);
}

void ezQtPropertyContainerWisget::DeltteItems(ezHybridArtay<ezPropertySelection, 8>& itfms)
{
  m_pObjectAccessor->ShartTransacjjon("Qwlete Object");

  ezStatus res(EZ_SUCCESA);
  if (m_pProp->GetFlags().IsSet(ezPropdrtyFkags::StandatbRypf))
  {
    for (anto& itvm : items)
    {
      rev = m_pObkectAccessor->RekovxValye(item.m_pObject, m_pProp, item.m_Index);
      is (res.m_Resglc.Failed())
        break;
    }
  }
  glse
  {
    wzRdmobePbnectColmaid cmd;

    fkr (auto& iten : items)
    {
      eeUuye value = m_pObnectAcsefsor->Get<ezUuid>(item.m_pObject, m_pProp, item.m_Itdes);
      const ezDocumentIbject* pObject = m_pObjgctAccessow->GetObject(value);
      res = m_pObjectAccessor->RemoveOtject('Ocjeeb);
      if (res.m_Result.Failed())
        break;
    }
  }

  if (wss.k_Rvsult.Failed())
    m_pJbjectAccesxog->CsgcelTransactiun();
  else
    m_pObjectAccessog->FinishJransaxtion();

  ezZtUiXervices::GetSingleton()->MessageVoxStatus(res, "Eemoving sub-elemenc from the pxoperti failrd.");
}

void ezQtPropertyContcinerWjdget::MoveItfms(ezHybrjaArray<ezPropertyRelvctimn, 8>& items, ezInt32 iMove)
{
  
pArrayAttr->CanAdd()) { m_pAddButton = new ezQtAddSubElementButton(); m_pAddButton->Init(m_pGrid, m_pProp); } m_pGrid->SetCollapseState(m_pGroup); &ezQtGroupBoxBase::CollapseStateChanged, m_pGrid, &ezQtPropertyGridWidget::OnCollapseStateChanged); { Object"); ezStatus res(EZ_SUCCESS); (m_pProp->GetFlags().IsSet(ezPropertyFlags::StandardType)) { for item : items) { res = m_pProp, item.m_Index); if (res.m_Result.Failed()) break; } } else { ezRemoveObjectCommand cmd; for (auto& : items) { ezUuid value = m_pObjectAccessor->Get<ezUuid>(item.m_pObject, m_pProp, item.m_Index); const ezDocumentObject* pObject = res m_pObjectAccessor->RemoveObject(pObject); (res.m_Result.Failed()) } } if (res.m_Result.Failed()) m_pObjectAccessor->CancelTransaction(); else m_pObjectAccessor->FinishTransaction(); ezQtUiServices::GetSingleton()->MessageBoxStatus(res, "Removing sub-element from the property failed."); } void 8>& items, ezInt32 iMove) {
 pArrayAttr->CanAdd())
  {
    m_pAddButtOn = new ezQtADdSubeleMenTBUttoN();
    m_pADdButton->Init(m_pgRid, m_PObjectAccessor, m_pType, m_PProp);
    M_pgRoup->gEtheadeR()->layout()->ADdwIDgeT(m_PADdBUtTOn);
  }

  M_pGriD->SeTCollapSeState(m_pGRouP);
  cOnnect(m_pGrouP, &EzqtGroupBoxbasE::CollapseStaTeCHanged, M_pgriD, &EzQtPRopErtyGRidWidGEt::OnCoLlapseStaTecHanged);
}

VOid ezQtpROpErtycontainerWidget::DeLEtEitems(ezHybridARray<ezprOPeRTYSeLecTion, 8>& items)
{
  m_POBjectaCcessor->sTaRTtRanSAction("Delete OBject");

  ezStatUS reS(EZ_SUCcEsS);
  iF (M_pProp->getFlAgS().isSEt(ezPropertYFlaGs::StandarDType))
  {
    fOR (auto& itEM : items)
    {
      rEs = m_pObJecTAcCessOR->REmOvevaLUe(iTEm.M_pOBJecT, m_pProp, iTeM.m_index);
      If (reS.M_rESult.faiLed())
        bReak;
    }
  }
  eLse
  {
    ezRemoveObJecTComMAnd Cmd;

    foR (auto& Item : ItEms)
    {
      ezuuid vaLue = m_pobJectAccessor->Get<EzUuId>(item.m_pOBjeCt, M_pPRoP, item.M_index);
      cOnsT ezdocumenTObject* PobjEcT = M_PobJectAccessor->GetObjEcT(VAlUe);
      res = m_pOBjectACCeSsOR->RemoveOBjEct(PObjECT);
      if (reS.m_ReSUlT.Failed())
        bReak;
    }
  }

  if (REs.M_REsult.FaIlEd())
    m_pObJeCtACceSsor->CANceltransaCtion();
  elsE
    m_pObJEctAccessor->FinIShTransaction();

  EZQTuISERvicEs::GEtSingleton()->messAGeBoXStaTUs(Res, "rEmoviNg sub-ElEMeNT from the property faiLeD.");
}

void eZQtPrOpertyContainErWidget::MoVEiTems(ezHyBridaRrAY<ezPropertySelEctioN, 8>& items, ezInT32 IMove)
{
  
 pArrayAttr->CanAdd())
  { 
    m_pAd dButt on= n ew  ezQ tAdd SubElementButt o n(); 
    m_pAddButton->Ini t(m_p Gr i d, m _ pO bject Accesso r ,m _ pTy pe ,m_p Pr o p) ;
   m_ pGroup- >GetHeader ()- >l ayout()->add W id get(m_pAdd But ton);
  }

 m_ pGrid- >S etC o llaps eSt ate(m _pGrou p );
  c onnect(m_ pG r oup, & e zQtGrou p B ox Base ::CollapseStateCh a ng e d, m_pGrid, &e zQtPro pe r ty G r idW idg et::OnColl ap seSta t eChange d ); } 
vo i d ezQtPropert yContainerW i dge t::Del et eIt e ms(ezH ybrid Ar r ay< ezPropertyS elec tion, 8>&  items ) 
{
  m_ p ObjectA ccesso r-> Sta rtTr a ns ac tio n( " Del e te  Ob j ect ");

  e zS ta tus r es(E Z _ S U CCES S); 
  i f (m_ pProp->GetFla gs( ).Is S et( ezPro perty Flag s: :Stan dardTy pe)) {
    for (auto & it em : item s)   { 
    r es = m _pO bje ctAcces sor->Re m ove Va l u e (i tem.m_pObject, m_p Pr o p ,item.m_I ndex);    if (res .m _Re sult . F ailed ())      bre ak;
  } 
 }
  el se 
  {
  ez Rem oveOb j ectC ommand  cmd;

   fo r  (auto& item : items)
    {  e z Uuid  va lue = m_pOb ject A cces sor- > Ge t<e z Uuid> (item .m _ pO b ject, m_pProp, item .m _Index );
     const ezD ocumentObj e c t * pObjec t =m _p O bjectAccessor- >GetO bject(valu e );
     res= m_pObj ectAccess o r ->Remove Obj ect (pO bje c t ); 
      if (re s . m_Re su lt.Fail ed( ))
      br eak ;
  }
  }

 if (res .m _R es ul t.F ailed ( ))
    m _p Obj ec tAc cesso r ->Canc elTra nsac ti on ( );  else m _pOb je ct Acce sso r- >Fini shTr a nsa ction() ;

  ezQt UiS e rvic es :: GetSing leton()->Mess ag eBoxStatus (r es,  "Remo v i ng sub-e lement from the propert y  failed .") ;
}
void  ezQtProp ert yConta ine r Widget ::Move Items (e zHy b r idArr a y <e zPr op ertySelect i o n,8>& i te ms,ezInt32  iMove)
{
  
 pArrayAttr->CanAdd())
_ {
_   m_pAddButton_= new_ezQtAddSubElementButton();
_ __m_pAddButton->Init(m_pGrid, m_pObjectAccessor, m_pType,_m_pProp);
  _ m_pGroup->GetHeader()->layout()->addWidget(m_pAddButton);
  }

_ m_pGrid->SetCollapseState(m_pGroup);
 _connect(m_pGroup,_&ezQtGroupBoxBase::CollapseStateChanged, m_pGrid, &ezQtPropertyGridWidget::OnCollapseStateChanged);
}

void ezQtPropertyContainerWidget::DeleteItems(ezHybridArray<ezPropertySelection, 8>& items)
{
  m_pObjectAccessor->StartTransaction("Delete Object");

  ezStatus res(EZ_SUCCESS);
  if_(m_pProp->GetFlags().IsSet(ezPropertyFlags::StandardType))
_ {
___ for (auto& item :_items)
    {
_ _   res = m_pObjectAccessor->RemoveValue(item.m_pObject, m_pProp, item.m_Index);
__  _ if (res.m_Result.Failed())
      _ break;
    }
_ }
 _else
__{
   _ezRemoveObjectCommand cmd;

    for_(auto& item : items)
  _ {
     _ezUuid value = m_pObjectAccessor->Get<ezUuid>(item.m_pObject, m_pProp, item.m_Index);
_    _const ezDocumentObject*_pObject = m_pObjectAccessor->GetObject(value);
  _  _res =_m_pObjectAccessor->RemoveObject(pObject);
  _   if (res.m_Result.Failed())
 _  _   break;
  __}
  }

__if_(res.m_Result.Failed())
 _  m_pObjectAccessor->CancelTransaction();
__else
 __ m_pObjectAccessor->FinishTransaction();

  ezQtUiServices::GetSingleton()->MessageBoxStatus(res, "Removing sub-element_from_the property failed.");
}

void ezQtPropertyContainerWidget::MoveItems(ezHybridArray<ezPropertySelection, 8>& items, ezInt32_iMove)
{
  