Warp cursor back to creation point after new-text dailog.
Also fixes same issue for new zones. Fixes: lp:1802532 * https://bugs.launchpad.net/kicad/+bug/1802532
This commit is contained in:
parent
6789103961
commit
befc504734
|
@ -376,6 +376,7 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
if( !text )
|
||||
{
|
||||
m_controls->ForceCursorPosition( true, m_controls->GetCursorPosition() );
|
||||
PCB_LAYER_ID layer = m_frame->GetActiveLayer();
|
||||
|
||||
// Init the new item attributes
|
||||
|
@ -432,6 +433,8 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
|
|||
if( text == NULL )
|
||||
continue;
|
||||
|
||||
m_controls->WarpCursor( text->GetPosition(), true );
|
||||
m_controls->ForceCursorPosition( false );
|
||||
m_controls->CaptureCursor( true );
|
||||
m_controls->SetAutoPan( true );
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ std::unique_ptr<ZONE_CONTAINER> ZONE_CREATE_HELPER::createNewZone( bool aKeepout
|
|||
{
|
||||
auto& frame = *m_tool.getEditFrame<PCB_BASE_EDIT_FRAME>();
|
||||
auto& board = *m_tool.getModel<BOARD>();
|
||||
KIGFX::VIEW_CONTROLS* controls = m_tool.GetManager()->GetViewControls();
|
||||
|
||||
// Get the current default settings for zones
|
||||
ZONE_SETTINGS zoneInfo = frame.GetZoneSettings();
|
||||
|
@ -83,6 +84,8 @@ std::unique_ptr<ZONE_CONTAINER> ZONE_CREATE_HELPER::createNewZone( bool aKeepout
|
|||
|
||||
if( dialogResult == wxID_CANCEL )
|
||||
return nullptr;
|
||||
|
||||
controls->WarpCursor( controls->GetCursorPosition(), true );
|
||||
}
|
||||
|
||||
auto newZone = std::make_unique<ZONE_CONTAINER>( &board );
|
||||
|
|
Loading…
Reference in New Issue