Fix issues with bus unfolding position

This commit is contained in:
Jon Evans 2019-03-17 16:36:48 -04:00 committed by Wayne Stambaugh
parent 464fa820b1
commit 54bfeb742c
2 changed files with 7 additions and 4 deletions

View File

@ -150,9 +150,6 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
// If the clarify item selection context menu is aborted, don't show the context menu.
if( item == NULL && actionCancelled )
return false;
if( item )
SetCrossHairPosition( item->GetPosition(), false );
}
// If a command is in progress: add "cancel" and "end tool" menu

View File

@ -480,6 +480,8 @@ void SCH_EDIT_FRAME::OnMoveItem( wxCommandEvent& aEvent )
return;
}
SetCrossHairPosition( item->GetPosition(), false );
GetCanvas()->GetViewControls()->WarpCursor( GetCrossHairPosition(), true );
switch( item->Type() )
@ -1477,6 +1479,10 @@ void SCH_EDIT_FRAME::OnUnfoldBusHotkey( wxCommandEvent& aEvent )
}
}
GetGalCanvas()->PopupMenu( bus_unfolding_menu, GetCrossHairScreenPosition() );
auto controls = GetCanvas()->GetViewControls();
auto vmp = controls->GetMousePosition( false );
wxPoint mouse_pos( (int) vmp.x, (int) vmp.y );
GetGalCanvas()->PopupMenu( bus_unfolding_menu, mouse_pos );
}
}