Fix issues with bus unfolding position
This commit is contained in:
parent
464fa820b1
commit
54bfeb742c
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue