fdo#50633 IDE: select current module in Object Catalog on open

Change-Id: Ieea731b0ed8eefdab616ed1f778b445aae14191c
This commit is contained in:
Uray M. János 2012-07-24 11:29:57 +02:00 committed by Noel Power
parent a5947d14c2
commit 44e8b1c8ad
4 changed files with 8 additions and 8 deletions

View file

@ -1205,6 +1205,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool bUpdateTabBar
GetViewFrame()->GetWindow().SetHelpId( HID_BASICIDE_MODULWINDOW );
SfxObjectShell::SetCurrentComponent( NULL );
}
pModulLayout->GetObjectCatalog().SetCurrentEntry(pCurWin);
SetUndoManager( pCurWin ? pCurWin->GetUndoManager() : 0 );
InvalidateBasicIDESlots();
EnableScrollbars( pCurWin ? sal_True : sal_False );

View file

@ -542,11 +542,7 @@ void BasicIDEShell::ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy
if ( pObjectCatalog )
{
pObjectCatalog->SetCancelHdl( LINK( this, BasicIDEShell, ObjectDialogCancelHdl ) );
BasicEntryDescriptor aDesc;
IDEBaseWindow* pCurWin_ = GetCurWindow();
if ( pCurWin_ )
aDesc = pCurWin_->CreateEntryDescriptor();
pObjectCatalog->SetCurrentEntry( aDesc );
pObjectCatalog->SetCurrentEntry(pCurWin);
}
}

View file

@ -223,9 +223,12 @@ void ObjectCatalog::UpdateEntries()
aMacroTreeList.UpdateEntries();
}
void ObjectCatalog::SetCurrentEntry( BasicEntryDescriptor& rDesc )
void ObjectCatalog::SetCurrentEntry (IDEBaseWindow* pCurWin)
{
aMacroTreeList.SetCurrentEntry( rDesc );
BasicEntryDescriptor aDesc;
if (pCurWin)
aDesc = pCurWin->CreateEntryDescriptor();
aMacroTreeList.SetCurrentEntry(aDesc);
}
ObjectCatalogToolBox_Impl::ObjectCatalogToolBox_Impl(

View file

@ -64,7 +64,7 @@ public:
virtual ~ObjectCatalog();
void UpdateEntries();
void SetCurrentEntry( BasicEntryDescriptor& rDesc );
void SetCurrentEntry (IDEBaseWindow* pCurWin);
void SetCancelHdl( const Link& rLink ) { aCancelHdl = rLink; }
};