diff options
| author | Peter Penz <[email protected]> | 2009-05-11 16:55:35 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-05-11 16:55:35 +0000 |
| commit | 43a0d3b11c933b1e6ef4c8f1cd088e771732fc8b (patch) | |
| tree | 15dbb9a2b71bf54c069473ed524ca9dd48f8fdc7 /src/dolphinview.cpp | |
| parent | 799e83a0bee63eb85bee780836d944ebce2b29a9 (diff) | |
Only select the clipboard items after the user triggered "Paste". This fixes the issue that items got selected accidently when creating items with a similar name to previously pasted items. BTW the code is also simpler now than before...
CCBUG: 191723
svn path=/trunk/KDE/kdebase/apps/; revision=966623
Diffstat (limited to 'src/dolphinview.cpp')
| -rw-r--r-- | src/dolphinview.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 0450eb460..e947508f0 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -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); } |
