Right click gets a new object if the mouse has moved
Right click is a pointing operation combined with a request for the context menu. We need to highlight the user's intended object when they have moved their mouse to a new element instead of showing the context menu for the selected object. However, in cases where the selection is difficult to make, it is sometimes helpful to select the item first, then right-click. In these cases, we keep the selection where the mouse remains inside the selected object's bounding box.
This commit is contained in:
parent
43768b71c0
commit
868ff5bb2c
|
@ -315,8 +315,10 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
bool selectionCancelled = false;
|
||||
|
||||
if( m_selection.Empty() )
|
||||
if( m_selection.Empty() ||
|
||||
!m_selection.GetBoundingBox().Contains( wxPoint( evt->Position() ) ) )
|
||||
{
|
||||
ClearSelection();
|
||||
SelectPoint( evt->Position(), EE_COLLECTOR::AllItems, &selectionCancelled );
|
||||
m_selection.SetIsHover( true );
|
||||
}
|
||||
|
|
|
@ -214,8 +214,10 @@ int SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
bool selectionCancelled = false;
|
||||
|
||||
if( m_selection.Empty() )
|
||||
if( m_selection.Empty() ||
|
||||
!m_selection.GetBoundingBox().Contains( wxPoint( evt->Position() ) ) )
|
||||
{
|
||||
ClearSelection();
|
||||
selectPoint( evt->Position(), false, &selectionCancelled );
|
||||
m_selection.SetIsHover( true );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue