[qet] [1418] Diagram view: update the scene after the title block template is changed.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 1418
Author:   xavier
Date:     2011-12-30 03:17:26 +0100 (Fri, 30 Dec 2011)
Log Message:
-----------
Diagram view: update the scene after the title block template is changed.

Modified Paths:
--------------
    branches/0.3/sources/diagramview.cpp

Modified: branches/0.3/sources/diagramview.cpp
===================================================================
--- branches/0.3/sources/diagramview.cpp	2011-12-30 02:05:46 UTC (rev 1417)
+++ branches/0.3/sources/diagramview.cpp	2011-12-30 02:17:26 UTC (rev 1418)
@@ -470,14 +470,19 @@
 		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 @@
 			/// TODO implement an undo command to allow the user to undo/redo this action
 			scene -> defaultConductorProperties = new_conductors;
 		}
+		if (adjust_scene) adjustSceneRect();
 	}
 }
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/