Net highlighting mode is toggled when used on the same net (GAL).
This commit is contained in:
parent
9f41fe0bda
commit
b1d241c271
|
@ -110,11 +110,11 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Function GetHighlight
|
||||
* Function IsHighlightEnabled
|
||||
* Returns current highlight setting.
|
||||
* @return True if highlight is enabled, false otherwise.
|
||||
*/
|
||||
inline bool GetHighlight() const
|
||||
inline bool IsHighlightEnabled() const
|
||||
{
|
||||
return m_highlightEnabled;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public:
|
|||
inline void SetHighlight( bool aEnabled, int aNetcode = -1 )
|
||||
{
|
||||
m_highlightEnabled = aEnabled;
|
||||
m_highlightNetcode = aNetcode;
|
||||
m_highlightNetcode = aEnabled ? aNetcode : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -700,7 +700,11 @@ static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition )
|
|||
if( enableHighlight )
|
||||
net = static_cast<BOARD_CONNECTED_ITEM*>( collector[0] )->GetNetCode();
|
||||
|
||||
if( enableHighlight != render->GetHighlight() || net != render->GetHighlightNetCode() )
|
||||
// Toggle highlight when the same net was picked
|
||||
if( net > 0 && net == render->GetHighlightNetCode() )
|
||||
enableHighlight = !render->IsHighlightEnabled();
|
||||
|
||||
if( enableHighlight != render->IsHighlightEnabled() || net != render->GetHighlightNetCode() )
|
||||
{
|
||||
render->SetHighlight( enableHighlight, net );
|
||||
aToolMgr->GetView()->UpdateAllLayersColor();
|
||||
|
|
Loading…
Reference in New Issue