Performance optimization for Symbol Fields Editor.

This commit is contained in:
Jeff Young 2018-10-17 02:03:50 +01:00
parent 594c1bded1
commit c19984e4de
2 changed files with 7 additions and 4 deletions

View File

@ -583,9 +583,12 @@ SCH_SHEET_PATH& SCH_EDIT_FRAME::GetCurrentSheet()
void SCH_EDIT_FRAME::SetCurrentSheet( const SCH_SHEET_PATH& aSheet ) void SCH_EDIT_FRAME::SetCurrentSheet( const SCH_SHEET_PATH& aSheet )
{ {
auto c = static_cast<SCH_DRAW_PANEL*>(m_canvas); if( aSheet != *m_CurrentSheet )
*m_CurrentSheet = aSheet; {
c->DisplaySheet( m_CurrentSheet->LastScreen() ); *m_CurrentSheet = aSheet;
static_cast<SCH_DRAW_PANEL*>( m_canvas )->DisplaySheet( m_CurrentSheet->LastScreen() );
}
} }

View File

@ -97,7 +97,7 @@ public:
LIB_PART* GetLibPart() const { return m_Entry; } LIB_PART* GetLibPart() const { return m_Entry; }
SCH_SHEET_PATH GetSheetPath() const { return m_SheetPath; } const SCH_SHEET_PATH& GetSheetPath() const { return m_SheetPath; }
int GetUnit() const { return m_Unit; } int GetUnit() const { return m_Unit; }