[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.4/kdebase/apps/plasma/applets/folderview
From: Fredrik Höglund <fredrik () kde ! org>
Date: 2010-05-13 19:39:15
Message-ID: 20100513193915.D9308AC8B5 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1126347 by fredrik:
Backport r1126346:
If a containment action is assigned to the left mouse button,
give it precedence over elastic-band selections.
M +12 -0 iconview.cpp
--- branches/KDE/4.4/kdebase/apps/plasma/applets/folderview/iconview.cpp #1126346:1126347
@@ -59,6 +59,7 @@
#include "animator.h"
#include <Plasma/Containment>
+#include <Plasma/ContainmentActions>
#include <Plasma/Corona>
#include <Plasma/PaintUtils>
#include <Plasma/Theme>
@@ -1848,6 +1849,17 @@
const Plasma::Containment *parent = qobject_cast<Plasma::Containment*>(parentWidget());
+ // If a containment action is assigned to the left mouse button,
+ // give it precedence over rubberband-selections
+ Plasma::Containment *containment = qobject_cast<Plasma::Containment*>(parentWidget());
+ if (containment && containment->isContainment()) {
+ const QString trigger = Plasma::ContainmentActions::eventToString(event);
+ if (!containment->containmentActions(trigger).isEmpty()) {
+ event->ignore();
+ return;
+ }
+ }
+
if (event->modifiers() & Qt::ControlModifier) {
// Make the current selection persistent
m_selectionModel->select(m_selectionModel->selection(), QItemSelectionModel::Select);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic