diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2018-03-18 11:58:33 -0400 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2018-03-18 11:58:33 -0400 |
commit | 8b8ea9395bdda4bb1404497ff654b82098084822 (patch) | |
tree | c92d720990686acda5eeba18b028fe1e4b656a25 /src/gui/undocommands.cpp | |
parent | 3cea1514203a451c0a8806d276807863b463a78f (diff) |
finally got bboxes working...i think
Diffstat (limited to 'src/gui/undocommands.cpp')
-rw-r--r-- | src/gui/undocommands.cpp | 7 |
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(); } |