From kde-commits Thu Jul 09 00:04:32 2009 From: =?utf-8?q?Aaron=20J=2E=20Seigo?= Date: Thu, 09 Jul 2009 00:04:32 +0000 To: kde-commits Subject: KDE/kdebase/workspace/plasma/containments/panel Message-Id: <1247097872.026485.3115.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=124709787829255 SVN commit 993594 by aseigo: swap the comparisons in --reverse CCBUG:187406 M +7 -1 panel.cpp --- trunk/KDE/kdebase/workspace/plasma/containments/panel/panel.cpp #993593:993594 @@ -309,7 +309,13 @@ QRectF siblingGeometry = lay->itemAt(i)->geometry(); if (f == Plasma::Horizontal) { qreal middle = (siblingGeometry.left() + siblingGeometry.right()) / 2.0; - if (pos.x() < middle) { + if (QApplication::layoutDirection() == Qt::RightToLeft) { + if (pos.x() > middle) { + insertIndex = i; + } else if (pos.x() >= siblingGeometry.left()) { + insertIndex = i + 1; + } + } else if (pos.x() < middle) { insertIndex = i; break; } else if (pos.x() <= siblingGeometry.right()) {