Skip to content

Commit

Permalink
fix nodeViewManager mouseEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
benkuper committed Nov 26, 2024
1 parent 4ca746a commit 34e6da2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Source/Node/ui/NodeManagerViewUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ NodeManagerViewUI::NodeManagerViewUI(NodeManager* manager) :

setShowTools(true);

removeMouseListener(this);
addMouseListener(this, true);
setDisableInternalMouseEvents(true);
addMouseListener(this, true);
}

NodeManagerViewUI::~NodeManagerViewUI()
Expand Down Expand Up @@ -70,7 +69,7 @@ void NodeManagerViewUI::addItemUIInternal(BaseNodeViewUI* ui)

void NodeManagerViewUI::mouseDown(const MouseEvent& e)
{
BaseManagerViewUI::mouseDown(e);
if(e.originalComponent == this) BaseManagerViewUI::mouseDown(e);
}

void NodeManagerViewUI::mouseDrag(const MouseEvent& e)
Expand All @@ -88,15 +87,15 @@ void NodeManagerViewUI::mouseDrag(const MouseEvent& e)
return;
}

BaseManagerViewUI::mouseDrag(e);
if(e.originalComponent == this) BaseManagerViewUI::mouseDrag(e);
}

void NodeManagerViewUI::mouseUp(const MouseEvent& e)
{
if (e.originalComponent == this) BaseManagerViewUI::mouseUp(e);
draggingConnector = nullptr;
forcedDragTargetPos = {};
repaint();
BaseManagerViewUI::mouseUp(e);
}

void NodeManagerViewUI::paintOverChildren(Graphics& g)
Expand Down

0 comments on commit 34e6da2

Please sign in to comment.