Skip to content

Commit

Permalink
allow clicks anywhere on add menu to not dismiss
Browse files Browse the repository at this point in the history
  • Loading branch information
alcomposer committed Sep 1, 2023
1 parent c36fb72 commit 37b29c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/Dialogs/AddObjectMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ class ObjectItem : public Component

void mouseDrag(MouseEvent const& e) override
{
if (e.getDistanceFromDragStart() < 5)
return;

auto* dragContainer = ZoomableDragAndDropContainer::findParentDragContainerFor(this);

if (dragContainer->isDragAndDropActive())
Expand All @@ -91,7 +94,8 @@ class ObjectItem : public Component

void mouseUp(MouseEvent const& e) override
{
dismissMenu(false);
if (e.mouseWasDraggedSinceMouseDown())
dismissMenu(false);
}

void lookAndFeelChanged() override
Expand Down

0 comments on commit 37b29c4

Please sign in to comment.