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
Jan Arve Saether 2013-12-05 10:25:23 +01:00 committed by The Qt Project
parent cd1ce77bf8
commit b86426c81e
1 changed files with 5 additions and 2 deletions

View File

@ -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())