We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b147ba0 commit 2bb8330Copy full SHA for 2bb8330
src/UndoCommands.cpp
@@ -234,6 +234,10 @@ DeleteCommand(BasicGraphicsScene* scene)
234
}
235
236
237
+ // If nothing is deleted, cancel this operation
238
+ if(connJsonArray.isEmpty() && nodesJsonArray.isEmpty())
239
+ setObsolete(true);
240
+
241
_sceneJson["nodes"] = nodesJsonArray;
242
_sceneJson["connections"] = connJsonArray;
243
@@ -251,9 +255,7 @@ void
251
255
DeleteCommand::
252
256
redo()
253
257
{
254
- auto & graphModel = _scene->graphModel();
-
- deleteSerializedItems(_sceneJson, graphModel);
258
+ deleteSerializedItems(_sceneJson, _scene->graphModel());
259
260
261
0 commit comments