From 51d0b8d2b5a8beb74a9c1cac894348be75b7e4a3 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 16 Feb 2023 13:19:58 +0000 Subject: [PATCH] Don't allow SCH_LABEL_LOCATE_ANY_T to steal SCH_LABEL_LOCATE_WIRE_T's items. Fixes https://gitlab.com/kicad/code/kicad/issues/13936 (cherry picked from commit 5967ab9a4d8793e4b448e06b6c3e8aa7de2edb41) --- .../dialog_global_edit_text_and_graphics.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp b/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp index 091efdb139..1a18a27880 100644 --- a/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp +++ b/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp @@ -489,6 +489,16 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem( const SCH_SHEET_PATH& aShe processItem( aSheetPath, pin ); } } + else if( m_wires->GetValue() && aItem->IsType( { SCH_ITEM_LOCATE_WIRE_T, + SCH_LABEL_LOCATE_WIRE_T } ) ) + { + processItem( aSheetPath, aItem ); + } + else if( m_buses->GetValue() && aItem->IsType( { SCH_ITEM_LOCATE_BUS_T, + SCH_LABEL_LOCATE_BUS_T } ) ) + { + processItem( aSheetPath, aItem ); + } else if( aItem->IsType( { SCH_LABEL_LOCATE_ANY_T } ) ) { if( m_globalLabels->GetValue() && aItem->Type() == SCH_GLOBAL_LABEL_T ) @@ -529,16 +539,6 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem( const SCH_SHEET_PATH& aShe } } } - else if( m_wires->GetValue() && aItem->IsType( { SCH_ITEM_LOCATE_WIRE_T, - SCH_LABEL_LOCATE_WIRE_T } ) ) - { - processItem( aSheetPath, aItem ); - } - else if( m_buses->GetValue() && aItem->IsType( { SCH_ITEM_LOCATE_BUS_T, - SCH_LABEL_LOCATE_BUS_T } ) ) - { - processItem( aSheetPath, aItem ); - } else if( m_schTextAndGraphics->GetValue() && aItem->IsType( { SCH_TEXT_T, SCH_TEXTBOX_T, SCH_ITEM_LOCATE_GRAPHIC_LINE_T, SCH_SHAPE_T } ) )