make select net dialog non-modal
also make sure to call BOARD::HighLightON before/after calling BOARD::SetHighLightNet
This commit is contained in:
parent
137fe48d88
commit
980f4a1f6a
|
@ -179,6 +179,7 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
||||||
renderSettings->SetHighlight( ( netcode >= 0 ), netcode );
|
renderSettings->SetHighlight( ( netcode >= 0 ), netcode );
|
||||||
|
|
||||||
pcb->SetHighLightNet( netcode );
|
pcb->SetHighLightNet( netcode );
|
||||||
|
pcb->HighLightON();
|
||||||
|
|
||||||
auto merge_area = [netcode, &bbox]( BOARD_CONNECTED_ITEM* aItem )
|
auto merge_area = [netcode, &bbox]( BOARD_CONNECTED_ITEM* aItem )
|
||||||
{
|
{
|
||||||
|
|
|
@ -191,6 +191,7 @@ int PCB_INSPECTION_TOOL::HighlightItem( const TOOL_EVENT& aEvent )
|
||||||
if( enableHighlight && net >= 0 )
|
if( enableHighlight && net >= 0 )
|
||||||
{
|
{
|
||||||
board->SetHighLightNet( net );
|
board->SetHighLightNet( net );
|
||||||
|
board->HighLightON();
|
||||||
|
|
||||||
NETINFO_ITEM* netinfo = board->FindNet( net );
|
NETINFO_ITEM* netinfo = board->FindNet( net );
|
||||||
|
|
||||||
|
@ -446,13 +447,10 @@ void PCB_INSPECTION_TOOL::calculateSelectionRatsnest()
|
||||||
|
|
||||||
int PCB_INSPECTION_TOOL::ListNets( const TOOL_EVENT& aEvent )
|
int PCB_INSPECTION_TOOL::ListNets( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
DIALOG_SELECT_NET_FROM_LIST dlg( m_frame );
|
if( m_listNetsDialog == nullptr )
|
||||||
|
m_listNetsDialog = std::make_unique<DIALOG_SELECT_NET_FROM_LIST>( m_frame );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
m_listNetsDialog->Show( true );
|
||||||
{
|
|
||||||
// Clear highlight
|
|
||||||
dlg.HighlightNet( nullptr );
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include <tools/pcb_actions.h>
|
#include <tools/pcb_actions.h>
|
||||||
#include <tools/pcb_tool_base.h>
|
#include <tools/pcb_tool_base.h>
|
||||||
|
|
||||||
|
class DIALOG_SELECT_NET_FROM_LIST;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PCB_INSPECTION_TOOL
|
* PCB_INSPECTION_TOOL
|
||||||
|
@ -102,6 +103,8 @@ private:
|
||||||
|
|
||||||
bool m_slowRatsnest; // Indicates current selection ratsnest will be slow to calculate
|
bool m_slowRatsnest; // Indicates current selection ratsnest will be slow to calculate
|
||||||
wxTimer m_ratsnestTimer; // Timer to initiate lazy ratsnest calculation (ie: when slow)
|
wxTimer m_ratsnestTimer; // Timer to initiate lazy ratsnest calculation (ie: when slow)
|
||||||
|
|
||||||
|
std::unique_ptr<DIALOG_SELECT_NET_FROM_LIST> m_listNetsDialog;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__BOARD_STATISTICS_TOOL_H
|
#endif //__BOARD_STATISTICS_TOOL_H
|
||||||
|
|
Loading…
Reference in New Issue