Fixed context menu showing up when user right clicks on 3D scene and release the mouse button after dragging over the objects list

This commit is contained in:
Enrico Turri 2019-10-09 13:39:24 +02:00
parent 1ade11fd57
commit a6a7303e25
3 changed files with 23 additions and 14 deletions
src/slic3r/GUI

View file

@ -778,7 +778,13 @@ void ObjectList::OnChar(wxKeyEvent& event)
void ObjectList::OnContextMenu(wxDataViewEvent&)
{
list_manipulation(true);
// Do not show the context menu if the user pressed the right mouse button on the 3D scene and released it on the objects list
GLCanvas3D* canvas = wxGetApp().plater()->canvas3D();
bool evt_context_menu = (canvas != nullptr) ? !canvas->is_mouse_dragging() : true;
if (!evt_context_menu)
canvas->mouse_up_cleanup();
list_manipulation(evt_context_menu);
}
void ObjectList::list_manipulation(bool evt_context_menu/* = false*/)