From 8b8ea9395bdda4bb1404497ff654b82098084822 Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Sun, 18 Mar 2018 11:58:33 -0400 Subject: finally got bboxes working...i think --- src/gui/undocommands.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/undocommands.cpp') 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(); } -- cgit v1.2.3