void IListDataSource::FireItemAddedEvent(size_t index) { if (mIsChanging) { mDirtyRange.ExpandRangeFrom(index,Count()-1); } else { OnItemAdded(index); } }
//***************************************************************************** // // Function Name: RGridCtrlBase::InitStorage( int nNumItems ) // // Description: Tells the grid control the number of items to be // displayed. // // Returns: the number of items to be displayed // // Exceptions: None // //***************************************************************************** int RGridCtrlBase::InitStorage( int nNumItems ) { int nOldCount = m_cxItemCount ; m_cxItemCount = nNumItems ; if (GetCurSel() >= nNumItems) { m_nCurCell = LB_ERR ; } OnItemAdded( min( nOldCount, nNumItems ) ) ; return m_cxItemCount ; }
void FWorldTreeItem::CreateFolder(TWeakPtr<SSceneOutliner> WeakOutliner) { auto Outliner = WeakOutliner.Pin(); if (Outliner.IsValid() && SharedData->RepresentingWorld) { const FScopedTransaction Transaction(LOCTEXT("UndoAction_CreateFolder", "Create Folder")); const FName NewFolderName = FActorFolders::Get().GetDefaultFolderName(*SharedData->RepresentingWorld, ""); FActorFolders::Get().CreateFolder(*SharedData->RepresentingWorld, NewFolderName); // At this point the new folder will be in our newly added list, so select it and open a rename when it gets refreshed Outliner->OnItemAdded(NewFolderName, ENewItemAction::Select | ENewItemAction::Rename); } }