Fixed a bug where toolbars sometimes could not be docked.
Task-number: QTBUG-33839 Change-Id: I542fb894c31ce38509a70a71bd0ea1bc84bb2a03 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>bb10
parent
cd1ce77bf8
commit
b86426c81e
|
|
@ -485,9 +485,12 @@ void QToolBarAreaLayoutInfo::moveToolBar(QToolBar *toolbar, int pos)
|
|||
|
||||
QList<int> QToolBarAreaLayoutInfo::gapIndex(const QPoint &pos, int *minDistance) const
|
||||
{
|
||||
int p = pick(o, pos);
|
||||
|
||||
if (rect.contains(pos)) {
|
||||
// <pos> is in QToolBarAreaLayout coordinates.
|
||||
// <item.pos> is in local dockarea coordinates (see ~20 lines below)
|
||||
// Since we're comparing p with item.pos, we put them in the same coordinate system.
|
||||
const int p = pick(o, pos - rect.topLeft());
|
||||
|
||||
for (int j = 0; j < lines.count(); ++j) {
|
||||
const QToolBarAreaLayoutLine &line = lines.at(j);
|
||||
if (line.skip())
|
||||
|
|
|
|||
Loading…
Reference in New Issue