Update message panel from PCB point editor and SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/11961
(cherry picked from commit 4f62960334
)
This commit is contained in:
parent
6a1dfd6e32
commit
042b49ee7b
|
@ -348,6 +348,7 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
symbol->SetPosition( (wxPoint)cursorPos );
|
symbol->SetPosition( (wxPoint)cursorPos );
|
||||||
m_view->Update( symbol );
|
m_view->Update( symbol );
|
||||||
|
m_frame->SetMsgPanel( symbol );
|
||||||
}
|
}
|
||||||
else if( symbol && evt->IsAction( &ACTIONS::doDelete ) )
|
else if( symbol && evt->IsAction( &ACTIONS::doDelete ) )
|
||||||
{
|
{
|
||||||
|
@ -570,6 +571,7 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent )
|
||||||
m_view->ClearPreview();
|
m_view->ClearPreview();
|
||||||
m_view->AddToPreview( image->Clone() );
|
m_view->AddToPreview( image->Clone() );
|
||||||
m_view->RecacheAllItems(); // Bitmaps are cached in Opengl
|
m_view->RecacheAllItems(); // Bitmaps are cached in Opengl
|
||||||
|
m_frame->SetMsgPanel( image );
|
||||||
}
|
}
|
||||||
else if( image && evt->IsAction( &ACTIONS::doDelete ) )
|
else if( image && evt->IsAction( &ACTIONS::doDelete ) )
|
||||||
{
|
{
|
||||||
|
@ -775,6 +777,7 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent )
|
||||||
previewItem->SetPosition( (wxPoint)cursorPos );
|
previewItem->SetPosition( (wxPoint)cursorPos );
|
||||||
m_view->ClearPreview();
|
m_view->ClearPreview();
|
||||||
m_view->AddToPreview( previewItem->Clone() );
|
m_view->AddToPreview( previewItem->Clone() );
|
||||||
|
m_frame->SetMsgPanel( previewItem );
|
||||||
}
|
}
|
||||||
else if( evt->Category() == TC_COMMAND )
|
else if( evt->Category() == TC_COMMAND )
|
||||||
{
|
{
|
||||||
|
@ -1031,6 +1034,7 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
m_view->AddToPreview( aChild->Clone() );
|
m_view->AddToPreview( aChild->Clone() );
|
||||||
} );
|
} );
|
||||||
|
m_frame->SetMsgPanel( item );
|
||||||
};
|
};
|
||||||
|
|
||||||
auto cleanup =
|
auto cleanup =
|
||||||
|
@ -1420,6 +1424,7 @@ int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent )
|
||||||
sizeSheet( sheet, cursorPos );
|
sizeSheet( sheet, cursorPos );
|
||||||
m_view->ClearPreview();
|
m_view->ClearPreview();
|
||||||
m_view->AddToPreview( sheet->Clone() );
|
m_view->AddToPreview( sheet->Clone() );
|
||||||
|
m_frame->SetMsgPanel( sheet );
|
||||||
}
|
}
|
||||||
else if( evt->IsClick( BUT_RIGHT ) )
|
else if( evt->IsClick( BUT_RIGHT ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -703,7 +703,9 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
|
||||||
m_controls->SetAutoPan( false );
|
m_controls->SetAutoPan( false );
|
||||||
m_controls->CaptureCursor( false );
|
m_controls->CaptureCursor( false );
|
||||||
m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
||||||
m_frame->SetMsgPanel( board() );
|
|
||||||
|
if( selection().Empty() )
|
||||||
|
m_frame->SetMsgPanel( board() );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1151,7 +1153,9 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
|
||||||
m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
||||||
|
|
||||||
m_view->Remove( &preview );
|
m_view->Remove( &preview );
|
||||||
m_frame->SetMsgPanel( board() );
|
|
||||||
|
if( selection().Empty() )
|
||||||
|
m_frame->SetMsgPanel( board() );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1727,7 +1731,9 @@ bool DRAWING_TOOL::drawSegment( const std::string& aTool, PCB_SHAPE** aGraphic,
|
||||||
|
|
||||||
m_view->Remove( &twoPointAsst );
|
m_view->Remove( &twoPointAsst );
|
||||||
m_view->Remove( &preview );
|
m_view->Remove( &preview );
|
||||||
m_frame->SetMsgPanel( board() );
|
|
||||||
|
if( selection().Empty() )
|
||||||
|
m_frame->SetMsgPanel( board() );
|
||||||
|
|
||||||
m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
||||||
m_controls->SetAutoPan( false );
|
m_controls->SetAutoPan( false );
|
||||||
|
@ -1996,7 +2002,9 @@ bool DRAWING_TOOL::drawArc( const std::string& aTool, PCB_SHAPE** aGraphic, bool
|
||||||
preview.Remove( graphic );
|
preview.Remove( graphic );
|
||||||
m_view->Remove( &arcAsst );
|
m_view->Remove( &arcAsst );
|
||||||
m_view->Remove( &preview );
|
m_view->Remove( &preview );
|
||||||
m_frame->SetMsgPanel( board() );
|
|
||||||
|
if( selection().Empty() )
|
||||||
|
m_frame->SetMsgPanel( board() );
|
||||||
|
|
||||||
m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
||||||
m_controls->SetAutoPan( false );
|
m_controls->SetAutoPan( false );
|
||||||
|
|
|
@ -1493,6 +1493,8 @@ void PCB_POINT_EDITOR::updateItem() const
|
||||||
}
|
}
|
||||||
|
|
||||||
getView()->Update( item );
|
getView()->Update( item );
|
||||||
|
|
||||||
|
frame()->SetMsgPanel( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue