]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Only select the clipboard items after the user triggered "Paste". This fixes the...
authorPeter Penz <peter.penz19@gmail.com>
Mon, 11 May 2009 16:55:35 +0000 (16:55 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Mon, 11 May 2009 16:55:35 +0000 (16:55 +0000)
CCBUG: 191723

svn path=/trunk/KDE/kdebase/apps/; revision=966623

src/dolphinview.cpp
src/dolphinview.h

index 0450eb460a61cede4428994e5fc8760fbc6ed3cd..e947508f07f8ecd5e9fc69ac117eca3afa58113f 100644 (file)
@@ -158,10 +158,6 @@ DolphinView::DolphinView(QWidget* parent,
     connect(&DolphinNewMenuObserver::instance(), SIGNAL(itemCreated(const KUrl&)),
             this, SLOT(observeCreatedItem(const KUrl&)));
 
-    // when a copy/move-operation has been finished, the pasted items should get selected
-    connect(KIO::FileUndoManager::self(), SIGNAL(jobRecordingFinished(CommandType)),
-           this, SLOT(slotJobRecordingFinished(CommandType)));
-
     applyViewProperties(url);
     m_topLayout->addWidget(itemView());
 }
@@ -1147,15 +1143,6 @@ void DolphinView::restoreSelection()
     changeSelection(m_selectedItems);
 }
 
-void DolphinView::slotJobRecordingFinished(CommandType command)
-{
-    // Assure that the pasted items get selected. This must be done
-    // asynchronously in slotDirListerCompleted().
-    m_selectClipboardItems = ((command == KIO::FileUndoManager::Copy) ||
-                              (command == KIO::FileUndoManager::Move)) &&
-                             !hasSelection();
-}
-
 void DolphinView::emitContentsMoved()
 {
     // only emit the contents moved signal if:
@@ -1513,6 +1500,7 @@ QAbstractItemView* DolphinView::itemView() const
 
 void DolphinView::pasteToUrl(const KUrl& url)
 {
+    m_selectClipboardItems = true;
     KonqOperations::doPaste(this, url);
 }
 
index cb48caf5679a381c4d94be7b7d0242eaaed8ca7b..122e0e1f54ef9cb15a7c3f2797292c155c971336 100644 (file)
@@ -682,12 +682,6 @@ private slots:
      */
     void restoreSelection();
 
-    /**
-     * Invoked when the undo manager indicates a finished operation.
-     * If a copy/move-operation has been done, the pasted items get selected.
-     */
-    void slotJobRecordingFinished(CommandType command);
-
 private:
     void loadDirectory(const KUrl& url, bool reload = false);