mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
Diagram view :
-Set maximum Visualized scene to diagram scene rect*2. -At first activation, view call zoom fit to see all of the diagram git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3861 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -199,6 +199,7 @@ void BorderTitleBlock::borderToXml(QDomElement &xml_elmt) {
|
||||
@param xml_elmt the XML element values will be read from
|
||||
*/
|
||||
void BorderTitleBlock::borderFromXml(const QDomElement &xml_elmt) {
|
||||
QRectF old_rect = diagram_rect_;
|
||||
bool ok;
|
||||
// columns count
|
||||
int cols_count = xml_elmt.attribute("cols").toInt(&ok);
|
||||
@@ -228,6 +229,11 @@ void BorderTitleBlock::borderFromXml(const QDomElement &xml_elmt) {
|
||||
displayRows(xml_elmt.attribute("displayrows") != "false");
|
||||
|
||||
updateRectangles();
|
||||
|
||||
//We emit signal even if diagram_rect not change
|
||||
//For calcul the scene rect when diagram load the first time the border.
|
||||
if (old_rect == diagram_rect_)
|
||||
emit(borderChanged(old_rect, old_rect));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user