From 6ec2096eb29212a2e692e2eba16fcc6ad0a53393 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@qt.io> Date: Tue, 20 Jun 2017 09:44:17 +0200 Subject: [PATCH] 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> --- src/designer/src/components/formeditor/widgetselection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) { -- GitLab