forked from qt-creator/qt-creator
QmlDesigner: Fix reset width and height
Task-number: QTBUG-38426 Change-Id: I28e9ed70042c118ff65801c4d07e5a67dc7c3db1 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
@@ -325,7 +325,7 @@ QSizeF QuickItemNodeInstance::size() const
|
||||
{
|
||||
double width;
|
||||
|
||||
if (DesignerSupport::isValidWidth(quickItem())) {
|
||||
if (DesignerSupport::isValidHeight(quickItem())) { // isValidHeight is QQuickItemPrivate::get(item)->widthValid
|
||||
width = quickItem()->width();
|
||||
} else {
|
||||
width = quickItem()->implicitWidth();
|
||||
@@ -333,7 +333,7 @@ QSizeF QuickItemNodeInstance::size() const
|
||||
|
||||
double height;
|
||||
|
||||
if (DesignerSupport::isValidHeight(quickItem())) {
|
||||
if (DesignerSupport::isValidWidth(quickItem())) { // isValidWidth is QQuickItemPrivate::get(item)->heightValid
|
||||
height = quickItem()->height();
|
||||
} else {
|
||||
height = quickItem()->implicitHeight();
|
||||
|
||||
Reference in New Issue
Block a user