mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20: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:
@@ -67,7 +67,6 @@ Diagram::Diagram(QETProject *project) :
|
||||
QPen pen(Qt::NoBrush, 1.5, Qt::DashLine);
|
||||
pen.setColor(Qt::black);
|
||||
conductor_setter_ -> setPen(pen);
|
||||
//conductor_setter_ -> setLine(QLineF(QPointF(0.0, 0.0), QPointF(0.0, 0.0)));
|
||||
|
||||
//Init object for manage movement
|
||||
elements_mover_ = new ElementsMover();
|
||||
@@ -75,6 +74,11 @@ Diagram::Diagram(QETProject *project) :
|
||||
|
||||
connect(&border_and_titleblock, SIGNAL(needTitleBlockTemplate(const QString &)), this, SLOT(setTitleBlockTemplate(const QString &)));
|
||||
connect(&border_and_titleblock, SIGNAL(diagramTitleChanged(const QString &)), this, SLOT(titleChanged(const QString &)));
|
||||
connect(&border_and_titleblock, &BorderTitleBlock::borderChanged, [this]() {
|
||||
QRectF old_rect = this->sceneRect();
|
||||
this->setSceneRect(border_and_titleblock.borderAndTitleBlockRect().united(this->itemsBoundingRect()));
|
||||
this->update(old_rect.united(this->sceneRect()));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user