Fix selection overlay being wiped when changing sheets
This commit is contained in:
parent
5c1b15f8e3
commit
053d20e13d
|
@ -2043,6 +2043,9 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet()
|
||||||
|
|
||||||
HardRedraw(); // Ensure all items are redrawn (especially the drawing-sheet items)
|
HardRedraw(); // Ensure all items are redrawn (especially the drawing-sheet items)
|
||||||
|
|
||||||
|
// Allow tools to re-add their VIEW_ITEMs after the last call to Clear in HardRedraw
|
||||||
|
m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD );
|
||||||
|
|
||||||
SCH_EDITOR_CONTROL* editTool = m_toolManager->GetTool<SCH_EDITOR_CONTROL>();
|
SCH_EDITOR_CONTROL* editTool = m_toolManager->GetTool<SCH_EDITOR_CONTROL>();
|
||||||
TOOL_EVENT dummy;
|
TOOL_EVENT dummy;
|
||||||
editTool->UpdateNetHighlighting( dummy );
|
editTool->UpdateNetHighlighting( dummy );
|
||||||
|
|
|
@ -336,6 +336,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
||||||
|
|
||||||
KIID lastRolloverItem = niluuid;
|
KIID lastRolloverItem = niluuid;
|
||||||
|
EE_GRID_HELPER grid( m_toolMgr );
|
||||||
|
|
||||||
// Main loop: keep receiving events
|
// Main loop: keep receiving events
|
||||||
while( TOOL_EVENT* evt = Wait() )
|
while( TOOL_EVENT* evt = Wait() )
|
||||||
|
@ -351,7 +352,6 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
evt->Modifier( MD_ALT ) );
|
evt->Modifier( MD_ALT ) );
|
||||||
|
|
||||||
MOUSE_DRAG_ACTION drag_action = m_frame->GetDragAction();
|
MOUSE_DRAG_ACTION drag_action = m_frame->GetDragAction();
|
||||||
EE_GRID_HELPER grid( m_toolMgr );
|
|
||||||
|
|
||||||
if( evt->IsMouseDown( BUT_LEFT ) )
|
if( evt->IsMouseDown( BUT_LEFT ) )
|
||||||
{
|
{
|
||||||
|
@ -1900,9 +1900,14 @@ void EE_SELECTION_TOOL::highlight( EDA_ITEM* aItem, int aMode, SELECTION* aGroup
|
||||||
[&]( SCH_ITEM* aChild )
|
[&]( SCH_ITEM* aChild )
|
||||||
{
|
{
|
||||||
if( aMode == SELECTED )
|
if( aMode == SELECTED )
|
||||||
|
{
|
||||||
aChild->SetSelected();
|
aChild->SetSelected();
|
||||||
|
getView()->Hide( aChild, true );
|
||||||
|
}
|
||||||
else if( aMode == BRIGHTENED )
|
else if( aMode == BRIGHTENED )
|
||||||
|
{
|
||||||
aChild->SetBrightened();
|
aChild->SetBrightened();
|
||||||
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1931,7 +1936,9 @@ void EE_SELECTION_TOOL::unhighlight( EDA_ITEM* aItem, int aMode, SELECTION* aGro
|
||||||
getView()->Hide( aItem, false );
|
getView()->Hide( aItem, false );
|
||||||
}
|
}
|
||||||
else if( aMode == BRIGHTENED )
|
else if( aMode == BRIGHTENED )
|
||||||
|
{
|
||||||
aItem->ClearBrightened();
|
aItem->ClearBrightened();
|
||||||
|
}
|
||||||
|
|
||||||
if( aGroup )
|
if( aGroup )
|
||||||
aGroup->Remove( aItem );
|
aGroup->Remove( aItem );
|
||||||
|
@ -1944,9 +1951,14 @@ void EE_SELECTION_TOOL::unhighlight( EDA_ITEM* aItem, int aMode, SELECTION* aGro
|
||||||
[&]( SCH_ITEM* aChild )
|
[&]( SCH_ITEM* aChild )
|
||||||
{
|
{
|
||||||
if( aMode == SELECTED )
|
if( aMode == SELECTED )
|
||||||
|
{
|
||||||
aChild->ClearSelected();
|
aChild->ClearSelected();
|
||||||
|
getView()->Hide( aChild, false );
|
||||||
|
}
|
||||||
else if( aMode == BRIGHTENED )
|
else if( aMode == BRIGHTENED )
|
||||||
|
{
|
||||||
aChild->ClearBrightened();
|
aChild->ClearBrightened();
|
||||||
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue