mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
revert the way of scaling operations before rev 2108 except for vertical and horizontal line
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2110 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -33,9 +33,20 @@ ElementPrimitiveDecorator::~ElementPrimitiveDecorator() {
|
||||
QRectF ElementPrimitiveDecorator::internalBoundingRect() const {
|
||||
if (!decorated_items_.count() || !scene()) return(QRectF());
|
||||
|
||||
QRectF rect = getSceneBoundingRect(decorated_items_.first() -> toItem());
|
||||
//if @decorated_items_ contain one item and if this item is a vertical or horizontal partline, apply a specific methode
|
||||
if ((decorated_items_.count() == 1) && (decorated_items_.first() -> xmlName() == "line")) {
|
||||
QRectF horto = decorated_items_.first() -> sceneGeometricRect();
|
||||
if (!horto.width() || !horto.height()) {
|
||||
QRectF rect = getSceneBoundingRect(decorated_items_.first() -> toItem());
|
||||
foreach (CustomElementPart *item, decorated_items_) {
|
||||
rect = rect.united(getSceneBoundingRect(item -> toItem()));
|
||||
}
|
||||
return (rect);
|
||||
}
|
||||
}
|
||||
QRectF rect = decorated_items_.first() -> sceneGeometricRect();
|
||||
foreach (CustomElementPart *item, decorated_items_) {
|
||||
rect = rect.united(getSceneBoundingRect(item -> toItem()));
|
||||
rect = rect.united(item -> sceneGeometricRect());
|
||||
}
|
||||
return(rect);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user