Move PLEditor title updating to somewhere it will get called.
Also cleans up some uncalled stuff.
This commit is contained in:
parent
94c8e84d3b
commit
a1b3e5d9bb
|
@ -917,20 +917,6 @@ void EDA_3D_VIEWER::CommonSettingsChanged()
|
|||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::OnLeftClick( wxDC *DC, const wxPoint &MousePos )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnLeftClick" );
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::OnRightClick( const wxPoint &MousePos, wxMenu *PopMenu )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnRightClick" );
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::OnKeyEvent( wxKeyEvent& event )
|
||||
{
|
||||
if( m_canvas )
|
||||
|
@ -940,13 +926,6 @@ void EDA_3D_VIEWER::OnKeyEvent( wxKeyEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::RedrawActiveWindow( wxDC *DC, bool EraseBg )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::RedrawActiveWindow" );
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::takeScreenshot( wxCommandEvent& event )
|
||||
{
|
||||
wxString fullFileName;
|
||||
|
|
|
@ -208,12 +208,8 @@ class EDA_3D_VIEWER : public KIWAY_PLAYER
|
|||
|
||||
void LoadSettings( wxConfigBase *aCfg ) override;
|
||||
|
||||
void OnLeftClick( wxDC *DC, const wxPoint &MousePos );
|
||||
void OnRightClick( const wxPoint &MousePos, wxMenu *PopMenu );
|
||||
void OnKeyEvent( wxKeyEvent& event );
|
||||
|
||||
void RedrawActiveWindow( wxDC *DC, bool EraseBg );
|
||||
|
||||
/**
|
||||
* Create a Screenshot of the current 3D view.
|
||||
* Output file format is png or jpeg, or image is copied to the clipboard
|
||||
|
|
|
@ -623,48 +623,6 @@ void PL_EDITOR_FRAME::PrintPage( wxDC* aDC, LSET , bool , void * )
|
|||
}
|
||||
|
||||
|
||||
void PL_EDITOR_FRAME::RedrawActiveWindow( wxDC* aDC, bool aEraseBg )
|
||||
{
|
||||
// JEY TODO: probably obsolete unless called for print....
|
||||
GetScreen()-> m_ScreenNumber = GetPageNumberOption() ? 1 : 2;
|
||||
|
||||
if( aEraseBg )
|
||||
m_canvas->EraseScreen( aDC );
|
||||
|
||||
m_canvas->DrawBackGround( aDC );
|
||||
|
||||
WS_DRAW_ITEM_LIST& drawList = GetPageLayout().GetDrawItems();
|
||||
|
||||
drawList.SetDefaultPenSize( 0 );
|
||||
drawList.SetMilsToIUfactor( IU_PER_MILS );
|
||||
drawList.SetSheetNumber( GetScreen()->m_ScreenNumber );
|
||||
drawList.SetSheetCount( GetScreen()->m_NumberOfScreens );
|
||||
drawList.SetFileName( GetCurrFileName() );
|
||||
drawList.SetSheetName( GetScreenDesc() );
|
||||
drawList.SetSheetLayer( wxEmptyString );
|
||||
|
||||
// Draw item list
|
||||
drawList.Draw( m_canvas->GetClipBox(), aDC, DARKMAGENTA );
|
||||
|
||||
#ifdef USE_WX_OVERLAY
|
||||
if( IsShown() )
|
||||
{
|
||||
m_overlay.Reset();
|
||||
wxDCOverlay overlaydc( m_overlay, (wxWindowDC*)aDC );
|
||||
overlaydc.Clear();
|
||||
}
|
||||
#endif
|
||||
|
||||
if( m_canvas->IsMouseCaptured() )
|
||||
m_canvas->CallMouseCapture( aDC, wxDefaultPosition, false );
|
||||
|
||||
m_canvas->DrawCrossHair( aDC );
|
||||
|
||||
// Display the filename
|
||||
UpdateTitleAndInfo();
|
||||
}
|
||||
|
||||
|
||||
void PL_EDITOR_FRAME::HardRedraw()
|
||||
{
|
||||
PL_DRAW_PANEL_GAL* drawPanel = static_cast<PL_DRAW_PANEL_GAL*>( GetGalCanvas() );
|
||||
|
@ -755,6 +713,9 @@ void PL_EDITOR_FRAME::OnNewPageLayout()
|
|||
|
||||
m_propertiesPagelayout->CopyPrmsFromItemToPanel( nullptr );
|
||||
m_propertiesPagelayout->CopyPrmsFromGeneralToPanel();
|
||||
|
||||
UpdateTitleAndInfo();
|
||||
|
||||
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
||||
m_canvas->Refresh();
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ public:
|
|||
void setupTools();
|
||||
|
||||
// Virtual basic functions:
|
||||
void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override;
|
||||
void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override { /* OBSOLETE */ }
|
||||
void ReCreateHToolbar() override;
|
||||
|
||||
void SetPageSettings(const PAGE_INFO&) override;
|
||||
|
|
Loading…
Reference in New Issue