From 6fb8916798b33602424c59c15c65b67b2941ce49 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 16 Apr 2023 18:44:58 +0100 Subject: [PATCH] The symbol viewer handles its own message panel. --- eeschema/tools/ee_inspection_tool.cpp | 31 ++++++++++++++++----------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/eeschema/tools/ee_inspection_tool.cpp b/eeschema/tools/ee_inspection_tool.cpp index 2731b58ccd..20232818de 100644 --- a/eeschema/tools/ee_inspection_tool.cpp +++ b/eeschema/tools/ee_inspection_tool.cpp @@ -442,26 +442,33 @@ int EE_INSPECTION_TOOL::ShowDatasheet( const TOOL_EVENT& aEvent ) int EE_INSPECTION_TOOL::UpdateMessagePanel( const TOOL_EVENT& aEvent ) { + SYMBOL_EDIT_FRAME* symbolEditFrame = dynamic_cast( m_frame ); + SCH_EDIT_FRAME* schEditFrame = dynamic_cast( m_frame ); EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool(); EE_SELECTION& selection = selTool->GetSelection(); - if( selection.GetSize() == 1 ) - { - EDA_ITEM* item = (EDA_ITEM*) selection.Front(); + // Note: the symbol viewer manages its own message panel - std::vector msgItems; - item->GetMsgPanelInfo( m_frame, msgItems ); - m_frame->SetMsgPanel( msgItems ); - } - else + if( symbolEditFrame || schEditFrame ) { - m_frame->ClearMsgPanel(); + if( selection.GetSize() == 1 ) + { + EDA_ITEM* item = (EDA_ITEM*) selection.Front(); + + std::vector msgItems; + item->GetMsgPanelInfo( m_frame, msgItems ); + m_frame->SetMsgPanel( msgItems ); + } + else + { + m_frame->ClearMsgPanel(); + } } - if( SCH_EDIT_FRAME* editFrame = dynamic_cast( m_frame ) ) + if( schEditFrame ) { - editFrame->UpdateNetHighlightStatus(); - editFrame->UpdateHierarchySelection(); + schEditFrame->UpdateNetHighlightStatus(); + schEditFrame->UpdateHierarchySelection(); } return 0;