From 064ab933dd37a50ae6cb13b41f9d6236b00ecfd3 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Thu, 23 Sep 2021 18:14:25 -0400 Subject: [PATCH] Always update the hierarchy navigator when setting the current sheet in the frame Fix #9221 --- eeschema/hierarch.cpp | 2 ++ eeschema/tools/sch_editor_control.cpp | 2 -- eeschema/tools/sch_navigate_tool.cpp | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/eeschema/hierarch.cpp b/eeschema/hierarch.cpp index c9e91fca96..ed251eb7cd 100644 --- a/eeschema/hierarch.cpp +++ b/eeschema/hierarch.cpp @@ -314,4 +314,6 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet() editTool->UpdateNetHighlighting( dummy ); HardRedraw(); // Ensure all items are redrawn (especially the drawing-sheet items) + + UpdateHierarchyNavigator(); } diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index ea0e4f4924..72b239d15c 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -1987,7 +1987,6 @@ int SCH_EDITOR_CONTROL::EnterSheet( const TOOL_EVENT& aEvent ) m_frame->GetCurrentSheet().push_back( sheet ); m_frame->DisplayCurrentSheet(); - m_frame->UpdateHierarchyNavigator(); } return 0; @@ -2006,7 +2005,6 @@ int SCH_EDITOR_CONTROL::LeaveSheet( const TOOL_EVENT& aEvent ) m_frame->GetCurrentSheet().pop_back(); m_frame->DisplayCurrentSheet(); - m_frame->UpdateHierarchyNavigator(); } return 0; diff --git a/eeschema/tools/sch_navigate_tool.cpp b/eeschema/tools/sch_navigate_tool.cpp index 026e9fc98f..954e48de1a 100644 --- a/eeschema/tools/sch_navigate_tool.cpp +++ b/eeschema/tools/sch_navigate_tool.cpp @@ -91,7 +91,6 @@ int SCH_NAVIGATE_TOOL::EnterSheet( const TOOL_EVENT& aEvent ) m_frame->GetCurrentSheet().push_back( sheet ); m_frame->DisplayCurrentSheet(); - m_frame->UpdateHierarchyNavigator(); } return 0; @@ -107,7 +106,6 @@ int SCH_NAVIGATE_TOOL::LeaveSheet( const TOOL_EVENT& aEvent ) m_frame->GetCurrentSheet().pop_back(); m_frame->DisplayCurrentSheet(); - m_frame->UpdateHierarchyNavigator(); } return 0;