Bug 72519 - Multiple select takes actions on files that are filtered out of the current view
Summary: Multiple select takes actions on files that are filtered out of the current view
Status: RESOLVED FIXED
Alias: None
Product: cervisia
Classification: Applications
Component: general (show other bugs)
Version: 2.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Loose
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-12 23:43 UTC by Dan Christensen
Modified: 2004-01-16 12:47 UTC (History)
0 users

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 Dan Christensen 2004-01-12 23:43:44 UTC
Version:           2.1 (using KDE 3.1.94 (3.2 Beta 2), SuSE)
Compiler:          gcc version 3.3.1 (SuSE Linux)
OS:          Linux (i686) release 2.4.21-144-default

I had the following files in my repository:
a.h (Up to date)
a.cpp (Up to date)
b.h (Locally Modified)
b.cpp (Locally Modified)
c.h (Up to date)
c.cpp (Up to date)
d.h (Up to date)
d.cpp (Up to date)
e.h (Locally Modified)
e.cpp (Locally Modified)
f.h (Up to date)
f.cpp (Up to date)

I selected "View | Hide Up-To-Date files", which resulted in the following list of files:
b.h (Locally Modified)
b.cpp (Locally Modified)
e.h (Locally Modified)
e.cpp (Locally Modified)

I selected all 4 files and hit '#' to commit. After filling out the comment, I watched the following command execute:

cvs -f commit -l -m "comment" b.h b.cpp c.h c.cpp d.h d.cpp e.h e.cpp

In other words, it included all of the files between 'b' and 'e' in the commit despite the fact that 'c' and 'd' were filtered out of the view. 

Although in this particular scenario no damage was done considering that the cvs commit ignored the files that were up to date, it seems like there could be scenarios where actions could occur that were not intended.
Comment 1 Dan Christensen 2004-01-13 21:50:58 UTC
I've dug into this a little bit and it looks like it may be a QListView problem. Apparently when you click an item, hold down the shift key and then select another item in the list it marks all the items between those two items as selected, regardless of whether or not they are visible. 

It would be easy enough to work around the problem by adding some code in UpdateView::multipleSelection and UpdateView::fileSelection to check whether or not the list item was visible before adding it to the string list. However, this is a problem that should probably be dealt with at the QT level.
Comment 2 Andre Woebbeking 2004-01-13 23:13:44 UTC
Hi Dan,

thank you for your report. You're right, there is missing an extra test if the item is visible. I'll ask the trolls if they consider this a bug.

This bug could be dangerous if you choose "Remove from Repository".


André
Comment 3 Andre Woebbeking 2004-01-16 12:47:24 UTC
Subject: kdesdk/cervisia

CVS commit by woebbe: 

Fix BR 72519 (file view):

Don't select hidden files when you select a range of files 
with Shift key. This prevents you from evil accidents (i.e.
"Remove from Repository").

CCMAIL: 72519-done@bugs.kde.org


  M +7 -1      ChangeLog   1.106
  M +3 -2      updateview.cpp   1.54


--- kdesdk/cervisia/ChangeLog  #1.105:1.106
@@ -1,2 +1,9 @@
+2004-01-16  Andr