mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 10:17:27 +02:00
[ui] GraphEditor: Added check for node shake and connected shake to disconnect nodes method
This commit is contained in:
parent
1fdf27022b
commit
b07540eaac
1 changed files with 7 additions and 0 deletions
|
@ -856,6 +856,10 @@ Item {
|
||||||
onAttributePinCreated: function(attribute, pin) { registerAttributePin(attribute, pin) }
|
onAttributePinCreated: function(attribute, pin) { registerAttributePin(attribute, pin) }
|
||||||
onAttributePinDeleted: function(attribute, pin) { unregisterAttributePin(attribute, pin) }
|
onAttributePinDeleted: function(attribute, pin) { unregisterAttributePin(attribute, pin) }
|
||||||
|
|
||||||
|
onShaked: {
|
||||||
|
uigraph.disconnectSelectedNodes();
|
||||||
|
}
|
||||||
|
|
||||||
onPressed: function(mouse) {
|
onPressed: function(mouse) {
|
||||||
nodeRepeater.updateSelectionOnClick = true;
|
nodeRepeater.updateSelectionOnClick = true;
|
||||||
nodeRepeater.ongoingDrag = true;
|
nodeRepeater.ongoingDrag = true;
|
||||||
|
@ -951,6 +955,9 @@ Item {
|
||||||
if(!selected || !dragging) {
|
if(!selected || !dragging) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for shake on the node
|
||||||
|
checkForShake();
|
||||||
// Compute offset between the delegate and the stored node position.
|
// Compute offset between the delegate and the stored node position.
|
||||||
const offset = Qt.point(x - node.x, y - node.y);
|
const offset = Qt.point(x - node.x, y - node.y);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue