Partial cherry-pick of 3904d7ccfc
.
Fixes: lp:1838006 * https://bugs.launchpad.net/kicad/+bug/1838006
This commit is contained in:
parent
e7f3851212
commit
6aeedfb70c
|
@ -33,6 +33,7 @@
|
|||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_marker_pcb.h>
|
||||
#include <class_pcb_text.h>
|
||||
|
||||
#include <pcbnew.h>
|
||||
#include <pcbnew_id.h>
|
||||
|
@ -125,6 +126,48 @@ void DIALOG_FIND::onButtonFindItemClick( wxCommandEvent& aEvent )
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for( BOARD_ITEM* item : module->GraphicalItems() )
|
||||
{
|
||||
if( item->Type() != PCB_MODULE_TEXT_T )
|
||||
continue;
|
||||
|
||||
TEXTE_MODULE* textItem = static_cast<TEXTE_MODULE*>( item );
|
||||
|
||||
if( WildCompareString( searchString, textItem->GetShownText().GetData(), false ) )
|
||||
{
|
||||
count++;
|
||||
|
||||
if( count > itemCount )
|
||||
{
|
||||
foundItem = module;
|
||||
pos = module->GetPosition();
|
||||
itemCount++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for( BOARD_ITEM* item : parent->GetBoard()->Drawings() )
|
||||
{
|
||||
if( item->Type() != PCB_MODULE_TEXT_T )
|
||||
continue;
|
||||
|
||||
TEXTE_PCB* textItem = static_cast<TEXTE_PCB*>( item );
|
||||
|
||||
if( WildCompareString( searchString, textItem->GetShownText().GetData(), false ) )
|
||||
{
|
||||
count++;
|
||||
|
||||
if( count > itemCount )
|
||||
{
|
||||
foundItem = textItem;
|
||||
pos = textItem->GetPosition();
|
||||
itemCount++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wxString msg;
|
||||
|
|
Loading…
Reference in New Issue