Delete Tool: Fix missing "Item Locked" popup
Fixes problem identified in https://gitlab.com/kicad/code/kicad/-/issues/8392 Removes same popup from schematic tool because SCH_ITEM can not be locked
This commit is contained in:
committed by
jean-pierre charras
parent
71b3ab432c
commit
64cd401bdb
@@ -486,10 +486,10 @@ int PCB_CONTROL::DeleteItemCursor( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
if( m_pickerItem && m_pickerItem->IsLocked() )
|
||||
{
|
||||
STATUS_TEXT_POPUP statusPopup( m_frame );
|
||||
statusPopup.SetText( _( "Item locked." ) );
|
||||
statusPopup.PopupFor( 2000 );
|
||||
statusPopup.Move( wxGetMousePosition() + wxPoint( 20, 20 ) );
|
||||
m_statusPopup.reset( new STATUS_TEXT_POPUP( m_frame ) );
|
||||
m_statusPopup->SetText( _( "Item locked." ) );
|
||||
m_statusPopup->PopupFor( 2000 );
|
||||
m_statusPopup->Move( wxGetMousePosition() + wxPoint( 20, 20 ) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -548,6 +548,8 @@ int PCB_CONTROL::DeleteItemCursor( const TOOL_EVENT& aEvent )
|
||||
if( m_pickerItem )
|
||||
m_toolMgr->GetTool<PCB_SELECTION_TOOL>()->UnbrightenItem( m_pickerItem );
|
||||
|
||||
m_statusPopup.reset();
|
||||
|
||||
// Ensure the cursor gets changed&updated
|
||||
m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
||||
m_frame->GetCanvas()->Refresh();
|
||||
|
||||
Reference in New Issue
Block a user