summaryrefslogtreecommitdiff
path: root/src/gui/undocommands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/undocommands.cpp')
-rw-r--r--src/gui/undocommands.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/undocommands.cpp b/src/gui/undocommands.cpp
index 0ebfd21..c9ca041 100644
--- a/src/gui/undocommands.cpp
+++ b/src/gui/undocommands.cpp
@@ -11,12 +11,14 @@ GraphUpdateCommand::GraphUpdateCommand(TikzScene *scene, QUndoCommand *parent) :
void GraphUpdateCommand::undo()
{
_scene->tikzDocument()->refreshTikz();
+ _scene->refreshSceneBounds();
_scene->invalidate();
}
void GraphUpdateCommand::redo()
{
_scene->tikzDocument()->refreshTikz();
+ _scene->refreshSceneBounds();
_scene->invalidate();
}
@@ -174,7 +176,7 @@ void AddNodeCommand::undo()
_scene->graph()->removeNode(_node);
- _scene->setBounds(_oldBounds);
+ //_scene->setBounds(_oldBounds);
GraphUpdateCommand::undo();
}
@@ -187,7 +189,8 @@ void AddNodeCommand::redo()
_scene->nodeItems().insert(_node, ni);
_scene->addItem(ni);
- _scene->setBounds(_newBounds);
+ //_scene->setBounds(_newBounds);
+
GraphUpdateCommand::redo();
}