MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / mouseReleaseEvent

Method mouseReleaseEvent

QtNodeEditor/src/NodeGraphicsObject.cpp:317–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315
316
317void
318NodeGraphicsObject::
319mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
320{
321 if( _double_clicked )
322 {
323 event->setModifiers(event->modifiers() | Qt::ControlModifier);
324 _double_clicked = false;
325 setSelected(true);
326 return;
327 }
328 else{
329 if (!isSelected() && event->modifiers() != Qt::ControlModifier)
330 {
331 _scene.clearSelection();
332 }
333 }
334
335
336 auto & state = _node.nodeState();
337
338 state.setResizing(false);
339
340 QGraphicsObject::mouseReleaseEvent(event);
341
342 // position connections precisely after fast node move
343 moveConnections();
344
345 if( (event->screenPos() - _press_pos).manhattanLength() > 20 )
346 {
347 _scene.nodeMoved(_node, pos());
348 }
349
350}
351
352
353void

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected