Git commit 93c018e8109c07ec457175275c71838cb1659a2d by Jaroslaw Staniek. Committed on 29/02/2016 at 23:07. Pushed by staniek into branch 'master'. Fix alignment of table view combo boxes when rows or columns are scrolled BUG:357655 FIXED-IN:2.9.11 (from calligra.git) M +12 -3 src/widget/tableview/kexicomboboxbase.cpp http://commits.kde.org/kexi/93c018e8109c07ec457175275c71838cb1659a2d diff --git a/src/widget/tableview/kexicomboboxbase.cpp b/src/widget/tablevi= ew/kexicomboboxbase.cpp index 63ff688..4ac8490 100644 --- a/src/widget/tableview/kexicomboboxbase.cpp +++ b/src/widget/tableview/kexicomboboxbase.cpp @@ -1,6 +1,6 @@ /* This file is part of the KDE project Copyright (C) 2002 Peter Simonsson - Copyright (C) 2003-2015 Jaros=C5=82aw Staniek + Copyright (C) 2003-2016 Jaros=C5=82aw Staniek = This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -19,17 +19,19 @@ */ = = -#include #include "kexicomboboxbase.h" +#include #include #include "kexicomboboxpopup.h" #include "KexiTableScrollArea.h" #include "kexi.h" +#include "KexiTableScrollAreaWidget.h" = #include = #include #include +#include = KexiComboBoxBase::KexiComboBoxBase() { @@ -421,8 +423,15 @@ void KexiComboBoxBase::createPopup(bool show) QPoint posMappedToGlobal =3D mapFromParentToGlobal(thisWidget->pos()); if (posMappedToGlobal !=3D QPoint(-1, -1)) { //! todo alter the position to fit the popup within screen boundaries + QPoint pos =3D posMappedToGlobal + QPoint(0, thisWidget->height()); + if (qobject_cast(thisWidget->parentWid= get())) { + KexiTableScrollArea* tableScroll + =3D qobject_cast(thisWidget->p= arentWidget())->scrollArea; + pos -=3D QPoint(tableScroll->horizontalScrollBar()->value(), + tableScroll->verticalScrollBar()->value()); + } popup()->hide(); - popup()->move(posMappedToGlobal + QPoint(0, thisWidget->height())); + popup()->move(pos); //qDebug() << "pos:" << posMappedToGlobal + QPoint(0, thisWidget->= height()); //to avoid flickering: first resize to 0-height, then show and res= ize back to prev. height const int w =3D popupWidthHint();