Prevent ghost image after canceling bitmap placement.

This commit is contained in:
Alex 2023-02-17 03:29:27 +03:00
parent 8b1318c92f
commit ecb28ddf1c
2 changed files with 2 additions and 0 deletions

View File

@ -501,6 +501,7 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent )
{ {
m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true ); m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );
m_view->ClearPreview(); m_view->ClearPreview();
m_view->RecacheAllItems();
delete image; delete image;
image = nullptr; image = nullptr;
}; };

View File

@ -572,6 +572,7 @@ int DRAWING_TOOL::PlaceImage( const TOOL_EVENT& aEvent )
{ {
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true ); m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true );
m_view->ClearPreview(); m_view->ClearPreview();
m_view->RecacheAllItems();
delete image; delete image;
image = nullptr; image = nullptr;
}; };