Bug 223905 - Selection after copy is wrong
Summary: Selection after copy is wrong
Status: RESOLVED UPSTREAM
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Gentoo Packages Unspecified
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-23 10:45 UTC by BRULE Herman
Modified: 2010-10-16 08:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BRULE Herman 2010-01-23 10:45:19 UTC
Version:            (using KDE 4.3.4)
Installed from:    Gentoo Packages

Hello, in file manager part of konqueror:
- I select file in window 1
- I copy file from window 2
- I paste it to window 1
The result: My previous file and the pasted file is selected.
Thanks to select only the new pasted file.
Comment 1 Frank Reininghaus 2010-01-26 16:08:00 UTC
Thanks for the report!

If I understand correctly, you want that the file in window 1 gets unselected when the file is pasted in window 2? This would be hard to implement, and it's not really a bug IMHO. It would be rather conterintuitive that actions in window 2 affect the selection in window 1, and it might actually be useful to keep the file selected in window 1: A user might want to copy a file to window 2 and then rename it in window 1.

It seems that also Nautilus behaves exactly like Konqueror and Dolphin in this regard.

Is there a good reason to unselect the copied file in window 1?
Comment 2 BRULE Herman 2010-01-26 16:25:45 UTC
That's do like microsoft windows explorer. When I paste file in the current windows, it select only the new pasted file.
Comment 3 BRULE Herman 2010-01-26 16:27:04 UTC
It's more intuitive (same under Mac) and more easy for do rename single file just after the copy.
Comment 4 Frank Reininghaus 2010-01-26 18:45:48 UTC
Oh, I'm sorry - somehow I messed up window 1 and window 2 when I tried to reproduce this. Please forget my comment 1! I agree that it might be useful to have only the pasted files selected, and not those that were selected before the new files were pasted.

Sorry again and thanks for reporting! I'll reassign to Dolphin because that's where the relevant code is.
Comment 5 BRULE Herman 2010-01-26 19:08:12 UTC
My main repport is for konqueror because I use konqueror as file manager.
Comment 6 Frank Reininghaus 2010-05-08 00:45:51 UTC
@Peter: I agree with the reporter that it's reasonable to clear the previous selection when the pasted or dropped items are selected (it seems that other file managers do it that way already). Is it OK to commit the patch below?

Index: src/dolphinview.cpp
===================================================================
--- src/dolphinview.cpp (revision 1123649)
+++ src/dolphinview.cpp (working copy)
@@ -1137,7 +1137,8 @@
 
     if (!m_newFileNames.isEmpty()) {
         // select all newly added items created by a paste operation or
-        // a drag & drop operation
+        // a drag & drop operation, and clear the previous selection
+        m_viewAccessor.itemView()->clearSelection();
         const int rowCount = m_viewAccessor.proxyModel()->rowCount();
         QItemSelection selection;
         for (int row = 0; row < rowCount; ++row) {
Comment 7 Frank Reininghaus 2010-05-27 20:10:54 UTC
SVN commit 1131230 by freininghaus:

When pasting or dropping items in the view in Dolphin or the
DolphinPart (running in Konqueror), do not only select the new items,
but also clear the previous selection.

BUG: 223905


 M  +2 -1      dolphinview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1131230
Comment 8 Frank Reininghaus 2010-05-27 20:15:23 UTC
SVN commit 1131231 by freininghaus:

When pasting or dropping items in the view in Dolphin or the
DolphinPart (running in Konqueror), do not only select the new items,
but also clear the previous selection.

CCBUG: 223905
FIXED-IN: 4.4.4


 M  +2 -1      dolphinview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1131231
Comment 9 BRULE Herman 2010-09-10 11:18:43 UTC
Seam not fixed here in KDE 4.5.1
Comment 10 Peter Penz 2010-10-15 14:44:58 UTC
> Seam not fixed here in KDE 4.5.1

Hm, works fine here with 4.5.1 (I used the steps from your initial comment to check). Are in your case still all files (= the previous one and the pasted one) selected? If 'yes', could you please provide a very detailed description what you did? Thanks!
Comment 11 BRULE Herman 2010-10-16 08:53:20 UTC
Now it work (execpte exptionnal case what I try isolate) then I close this bug.