summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-20 09:44:17 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-26 15:05:25 +0000
commit6ec2096eb29212a2e692e2eba16fcc6ad0a53393 (patch)
tree2c31e294ff1a63748b6c2a9d8f72ebf7bc60f192
parent9da07cc30fdf2facaa9d4639ce6ca97509742fc4 (diff)
downloadqttools-6ec2096eb29212a2e692e2eba16fcc6ad0a53393.tar.gz
Qt Designer: Fix shrinking row span of QGridLayout items
Previously, shrinking a row span by moving the bottom widget handle up did not work due to the code checking the width of the item. Correct to check on the height when creating the command. Change-Id: Ieb1cf7eb0e78bb2edba7f2a7d7ff920f28ada509 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
-rw-r--r--src/designer/src/components/formeditor/widgetselection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/designer/src/components/formeditor/widgetselection.cpp b/src/designer/src/components/formeditor/widgetselection.cpp
index 70a75f54f..eda77e213 100644
--- a/src/designer/src/components/formeditor/widgetselection.cpp
+++ b/src/designer/src/components/formeditor/widgetselection.cpp
@@ -477,7 +477,7 @@ void WidgetHandle::changeGridLayoutItemSpan()
break;
case WidgetHandle::Bottom: {
- if (pt.y() > 0 && info.width() > 1) {
+ if (pt.y() > 0 && info.height() > 1) {
cmd = new ChangeLayoutItemGeometry(m_formWindow);
cmd->init(m_widget, info.y(), info.x(), info.height() - 1, info.width());
} else if (pt.y() < 0 && bottom != -1 && grid->itemAt(bottom)->spacerItem()) {