mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
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
This commit is contained in:
@@ -470,14 +470,19 @@ void DiagramView::editDiagramProperties() {
|
|||||||
TitleBlockProperties new_titleblock = titleblock_infos -> titleBlockProperties();
|
TitleBlockProperties new_titleblock = titleblock_infos -> titleBlockProperties();
|
||||||
BorderProperties new_border = border_infos -> borderProperties();
|
BorderProperties new_border = border_infos -> borderProperties();
|
||||||
ConductorProperties new_conductors = cpw -> conductorProperties();
|
ConductorProperties new_conductors = cpw -> conductorProperties();
|
||||||
|
|
||||||
|
bool adjust_scene = false;
|
||||||
|
|
||||||
// s'il y a des modifications au cartouche
|
// s'il y a des modifications au cartouche
|
||||||
if (new_titleblock != titleblock) {
|
if (new_titleblock != titleblock) {
|
||||||
scene -> undoStack().push(new ChangeTitleBlockCommand(scene, titleblock, new_titleblock));
|
scene -> undoStack().push(new ChangeTitleBlockCommand(scene, titleblock, new_titleblock));
|
||||||
|
adjust_scene = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// s'il y a des modifications aux dimensions du schema
|
// s'il y a des modifications aux dimensions du schema
|
||||||
if (new_border != border) {
|
if (new_border != border) {
|
||||||
scene -> undoStack().push(new ChangeBorderCommand(scene, border, new_border));
|
scene -> undoStack().push(new ChangeBorderCommand(scene, border, new_border));
|
||||||
|
adjust_scene = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if modifcations have been made to the conductors properties
|
// 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
|
/// TODO implement an undo command to allow the user to undo/redo this action
|
||||||
scene -> defaultConductorProperties = new_conductors;
|
scene -> defaultConductorProperties = new_conductors;
|
||||||
}
|
}
|
||||||
|
if (adjust_scene) adjustSceneRect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user