diff --git a/eeschema/hierarch.cpp b/eeschema/hierarch.cpp index 6f6b44c89e..578274b173 100644 --- a/eeschema/hierarch.cpp +++ b/eeschema/hierarch.cpp @@ -24,7 +24,7 @@ */ /** - * @file hierarch.schframe + * @file hierarch.cpp */ #include @@ -110,14 +110,13 @@ public: SCH_EDIT_FRAME* m_Parent; HIERARCHY_TREE* m_Tree; int m_nbsheets; - wxDC* m_DC; private: wxSize m_TreeSize; int maxposx; public: - HIERARCHY_NAVIG_DLG( SCH_EDIT_FRAME* parent, wxDC* DC, const wxPoint& pos ); + HIERARCHY_NAVIG_DLG( SCH_EDIT_FRAME* aParent, const wxPoint& aPos ); void BuildSheetsTree( SCH_SHEET_PATH* list, wxTreeItemId* previousmenu ); ~HIERARCHY_NAVIG_DLG(); @@ -135,23 +134,22 @@ BEGIN_EVENT_TABLE( HIERARCHY_NAVIG_DLG, wxDialog ) END_EVENT_TABLE() -void SCH_EDIT_FRAME::InstallHierarchyFrame( wxDC* DC, wxPoint& pos ) +void SCH_EDIT_FRAME::InstallHierarchyFrame( wxPoint& pos ) { - HIERARCHY_NAVIG_DLG* treeframe = new HIERARCHY_NAVIG_DLG( this, DC, pos ); + HIERARCHY_NAVIG_DLG* treeframe = new HIERARCHY_NAVIG_DLG( this, pos ); treeframe->ShowModal(); treeframe->Destroy(); } -HIERARCHY_NAVIG_DLG::HIERARCHY_NAVIG_DLG( SCH_EDIT_FRAME* parent, wxDC* DC, const wxPoint& pos ) : - wxDialog( parent, -1, _( "Navigator" ), pos, wxSize( 110, 50 ), +HIERARCHY_NAVIG_DLG::HIERARCHY_NAVIG_DLG( SCH_EDIT_FRAME* aParent, const wxPoint& aPos ) : + wxDialog( aParent, wxID_ANY, _( "Navigator" ), aPos, wxSize( 110, 50 ), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ) { wxTreeItemId cellule; - m_Parent = parent; - m_DC = DC; + m_Parent = aParent; m_Tree = new HIERARCHY_TREE( this ); m_nbsheets = 1; @@ -297,6 +295,7 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet() screen->m_FirstRedraw = false; SetCrossHairPosition( GetScrollCenterPosition() ); m_canvas->MoveCursorToCrossHair(); + screen->SchematicCleanUp( GetCanvas(), NULL ); } else { diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index db64c0519a..f7a8ae4736 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -120,7 +120,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) switch( id ) { case ID_HIERARCHY: - InstallHierarchyFrame( &dc, pos ); + InstallHierarchyFrame( pos ); SetRepeatItem( NULL ); break; diff --git a/eeschema/schframe.h b/eeschema/schframe.h index 8761eda086..0db8ea8224 100644 --- a/eeschema/schframe.h +++ b/eeschema/schframe.h @@ -953,7 +953,7 @@ private: void EditImage( SCH_BITMAP* aItem ); // Hierarchical Sheet & PinSheet - void InstallHierarchyFrame( wxDC* DC, wxPoint& pos ); + void InstallHierarchyFrame( wxPoint& pos ); SCH_SHEET* CreateSheet( wxDC* DC ); void ReSizeSheet( SCH_SHEET* Sheet, wxDC* DC );