From 5a1d55766852cd9b9bde296e92ef6808cdd4e3bf Mon Sep 17 00:00:00 2001 From: xavier Date: Fri, 30 Dec 2011 02:17:26 +0000 Subject: [PATCH] Diagram view: update the scene after the title block template is changed. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1418 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/diagramview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sources/diagramview.cpp b/sources/diagramview.cpp index 09c218e7c..d0cda2775 100644 --- a/sources/diagramview.cpp +++ b/sources/diagramview.cpp @@ -470,14 +470,19 @@ void DiagramView::editDiagramProperties() { TitleBlockProperties new_titleblock = titleblock_infos -> titleBlockProperties(); BorderProperties new_border = border_infos -> borderProperties(); ConductorProperties new_conductors = cpw -> conductorProperties(); + + bool adjust_scene = false; + // s'il y a des modifications au cartouche if (new_titleblock != titleblock) { scene -> undoStack().push(new ChangeTitleBlockCommand(scene, titleblock, new_titleblock)); + adjust_scene = true; } // s'il y a des modifications aux dimensions du schema if (new_border != border) { scene -> undoStack().push(new ChangeBorderCommand(scene, border, new_border)); + adjust_scene = true; } // if modifcations have been made to the conductors properties @@ -485,6 +490,7 @@ void DiagramView::editDiagramProperties() { /// TODO implement an undo command to allow the user to undo/redo this action scene -> defaultConductorProperties = new_conductors; } + if (adjust_scene) adjustSceneRect(); } }