SetLineNumberDisplay appropriately when opening or swithin modules

This commit is contained in:
Norbert Thiebaud
2011-11-17 21:48:30 -06:00
parent ae78e3e913
commit a1d800a7a7
2 changed files with 10 additions and 0 deletions

View File

@@ -1143,6 +1143,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool bUpdateTabBar
AdjustPosSizePixel( Point( 0, 0 ), GetViewFrame()->GetWindow().GetOutputSizePixel() );
if( pCurWin->IsA( TYPE( ModulWindow ) ) )
{
dynamic_cast<ModulWindow*>(pCurWin)->SetLineNumberDisplay(SourceLinesDisplayed());
GetViewFrame()->GetWindow().SetHelpId( HID_BASICIDE_MODULWINDOW );
pModulLayout->SetModulWindow( (ModulWindow*)pCurWin );
pModulLayout->Show();

View File

@@ -54,6 +54,7 @@
#include <tools/diagnose_ex.h>
#include <basidesh.hrc>
#include <basidesh.hxx>
#include <baside2.hxx>
#include <basdoc.hxx>
#include <basobj.hxx>
#include <bastypes.hxx>
@@ -288,11 +289,19 @@ BasicIDEShell::~BasicIDEShell()
void BasicIDEShell::onDocumentCreated( const ScriptDocument& /*_rDocument*/ )
{
if(pCurWin && pCurWin->IsA( TYPE(ModulWindow)))
{
dynamic_cast<ModulWindow*>(pCurWin)->SetLineNumberDisplay(SourceLinesDisplayed());
}
UpdateWindows();
}
void BasicIDEShell::onDocumentOpened( const ScriptDocument& /*_rDocument*/ )
{
if(pCurWin && pCurWin->IsA( TYPE(ModulWindow)))
{
dynamic_cast<ModulWindow*>(pCurWin)->SetLineNumberDisplay(SourceLinesDisplayed());
}
UpdateWindows();
}