diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2018-09-21 08:48:43 +0200 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2018-09-21 08:48:43 +0200 |
commit | 5e5a98b97871ebaa3899e2f1bf08534e32f1f983 (patch) | |
tree | a6a5f006dfc9e0e9ad429181166f5aa5ce48da23 /src/gui/undocommands.cpp | |
parent | afcf3dba0753d71b801fb035277b2ec857f19de9 (diff) |
fixed bug with edge styles
Diffstat (limited to 'src/gui/undocommands.cpp')
-rw-r--r-- | src/gui/undocommands.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/undocommands.cpp b/src/gui/undocommands.cpp index 0cfa0bd..2ed5034 100644 --- a/src/gui/undocommands.cpp +++ b/src/gui/undocommands.cpp @@ -422,7 +422,10 @@ ReplaceGraphCommand::ReplaceGraphCommand(TikzScene *scene, Graph *oldGraph, Grap void ReplaceGraphCommand::undo() { foreach (Node *n, _oldGraph->nodes()) n->attachStyle(); - foreach (Edge *e, _oldGraph->edges()) e->updateControls(); + foreach (Edge *e, _oldGraph->edges()) { + e->attachStyle(); + e->updateControls(); + } _scene->tikzDocument()->setGraph(_oldGraph); _scene->graphReplaced(); } @@ -430,7 +433,10 @@ void ReplaceGraphCommand::undo() void ReplaceGraphCommand::redo() { foreach (Node *n, _newGraph->nodes()) n->attachStyle(); - foreach (Edge *e, _newGraph->edges()) e->updateControls(); + foreach (Edge *e, _newGraph->edges()) { + e->attachStyle(); + e->updateControls(); + } _scene->tikzDocument()->setGraph(_newGraph); _scene->graphReplaced(); } @@ -496,4 +502,4 @@ void RotateNodesCommand::redo() _scene->refreshAdjacentEdges(_nodes.toList()); GraphUpdateCommand::redo(); -}
\ No newline at end of file +} |