]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphiniconsview.cpp
revert fix for bug 167044 - although the crash is fixed the autoscroll does not work...
[dolphin.git] / src / dolphiniconsview.cpp
index a7b256d2be8ab261e1413e1516c6872fda959aff..059ce89ab1c6b2907386ca75de64bbdf28131ea2 100644 (file)
@@ -34,8 +34,6 @@
 
 #include <QAbstractProxyModel>
 #include <QApplication>
-#include <QPainter>
-#include <QPoint>
 #include <QScrollBar>
 
 DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controller) :
@@ -69,17 +67,19 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
     if (KGlobalSettings::singleClick()) {
         connect(this, SIGNAL(clicked(const QModelIndex&)),
                 controller, SLOT(triggerItem(const QModelIndex&)));
-        if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) {
-            m_selectionManager = new SelectionManager(this);
-            connect(m_selectionManager, SIGNAL(selectionChanged()),
-                    this, SLOT(requestActivation()));
-            connect(m_controller, SIGNAL(urlChanged(const KUrl&)),
-                    m_selectionManager, SLOT(reset()));
-        }
     } else {
         connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
                 controller, SLOT(triggerItem(const QModelIndex&)));
     }
+
+    if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) {
+        m_selectionManager = new SelectionManager(this);
+        connect(m_selectionManager, SIGNAL(selectionChanged()),
+                this, SLOT(requestActivation()));
+        connect(m_controller, SIGNAL(urlChanged(const KUrl&)),
+                m_selectionManager, SLOT(reset()));
+    }
+
     connect(this, SIGNAL(entered(const QModelIndex&)),
             controller, SLOT(emitItemEntered(const QModelIndex&)));
     connect(this, SIGNAL(viewportEntered()),
@@ -192,6 +192,9 @@ void DolphinIconsView::mousePressEvent(QMouseEvent* event)
     }
 
     if (!index.isValid()) {
+        if (QApplication::mouseButtons() & Qt::MidButton) {
+            m_controller->replaceUrlByClipboard();
+        }
         const Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers();
         if (!(modifier & Qt::ShiftModifier) && !(modifier & Qt::ControlModifier)) {
             clearSelection();