formatting and fix selection clarification bug in pcbnew, could not move reference text when hidden under another footprint
This commit is contained in:
parent
c58bd957a5
commit
7377cb541f
|
@ -158,14 +158,14 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa
|
|||
switch( item->Type() )
|
||||
{
|
||||
case PCB_PAD_T:
|
||||
{
|
||||
MODULE* m = (MODULE*) item->GetParent();
|
||||
|
||||
if( m->GetReference() == wxT( "Y2" ) )
|
||||
{
|
||||
breakhere++;
|
||||
MODULE* m = (MODULE*) item->GetParent();
|
||||
|
||||
if( m->GetReference() == wxT( "Y2" ) )
|
||||
{
|
||||
breakhere++;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PCB_VIA_T:
|
||||
|
@ -193,25 +193,25 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa
|
|||
break;
|
||||
|
||||
case PCB_MODULE_TEXT_T:
|
||||
{
|
||||
TEXTE_MODULE* tm = (TEXTE_MODULE*) item;
|
||||
|
||||
if( tm->GetText() == wxT( "10uH" ) )
|
||||
{
|
||||
breakhere++;
|
||||
TEXTE_MODULE* tm = (TEXTE_MODULE*) item;
|
||||
|
||||
if( tm->GetText() == wxT( "10uH" ) )
|
||||
{
|
||||
breakhere++;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PCB_MODULE_T:
|
||||
{
|
||||
MODULE* m = (MODULE*) item;
|
||||
|
||||
if( m->GetReference() == wxT( "C98" ) )
|
||||
{
|
||||
breakhere++;
|
||||
MODULE* m = (MODULE*) item;
|
||||
|
||||
if( m->GetReference() == wxT( "C98" ) )
|
||||
{
|
||||
breakhere++;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PCB_MARKER_T:
|
||||
|
@ -324,7 +324,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa
|
|||
// Pads are not sensitive to the layer visibility controls.
|
||||
// They all have their own separate visibility controls
|
||||
// skip them if not visible
|
||||
if ( pad )
|
||||
if( pad )
|
||||
{
|
||||
if( m_Guide->IgnorePads() )
|
||||
goto exit;
|
||||
|
|
|
@ -54,8 +54,19 @@ extern bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool,
|
|||
*/
|
||||
static BOARD_ITEM* AllAreModulesAndReturnSmallestIfSo( GENERAL_COLLECTOR* aCollector )
|
||||
{
|
||||
#if 0 // Dick: this is not consistent with name of this function, and does not
|
||||
// work correctly using 'M' (move hotkey) when another module's (2nd module) reference
|
||||
// is under a module (first module) and you want to move the reference.
|
||||
// Another way to fix this would be to
|
||||
// treat module text as copper layer content, and put the module text into
|
||||
// the primary list. I like the coded behavior best. If it breaks something
|
||||
// perhaps you need a different test before calling this function, which should
|
||||
// do what its name says it does.
|
||||
int count = aCollector->GetPrimaryCount(); // try to use preferred layer
|
||||
if( 0 == count ) count = aCollector->GetCount();
|
||||
#else
|
||||
int count = aCollector->GetCount();
|
||||
#endif
|
||||
|
||||
for( int i = 0; i<count; ++i )
|
||||
{
|
||||
|
|
|
@ -770,7 +770,7 @@ bool PCB_EDIT_FRAME::OnHotkeyMoveItem( int aIdCommand )
|
|||
|
||||
SetCurItem( item );
|
||||
|
||||
int evt_type = 0; //Used to post a wxCommandEvent on demand
|
||||
int evt_type = 0; // Used to post a wxCommandEvent on demand
|
||||
|
||||
switch( item->Type() )
|
||||
{
|
||||
|
@ -788,14 +788,14 @@ bool PCB_EDIT_FRAME::OnHotkeyMoveItem( int aIdCommand )
|
|||
break;
|
||||
|
||||
case PCB_MODULE_T:
|
||||
{
|
||||
if( aIdCommand == HK_MOVE_ITEM )
|
||||
evt_type = ID_POPUP_PCB_MOVE_MODULE_REQUEST;
|
||||
{
|
||||
if( aIdCommand == HK_MOVE_ITEM )
|
||||
evt_type = ID_POPUP_PCB_MOVE_MODULE_REQUEST;
|
||||
|
||||
if( aIdCommand == HK_DRAG_ITEM )
|
||||
evt_type = ID_POPUP_PCB_DRAG_MODULE_REQUEST;
|
||||
}
|
||||
break;
|
||||
if( aIdCommand == HK_DRAG_ITEM )
|
||||
evt_type = ID_POPUP_PCB_DRAG_MODULE_REQUEST;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCB_PAD_T:
|
||||
// Post MODULE_REQUEST events here to prevent pads
|
||||
|
|
Loading…
Reference in New Issue