diff options
| author | Peter Penz <[email protected]> | 2011-08-24 22:36:05 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-08-24 22:37:16 +0200 |
| commit | cae90c168ebf8e81f5bb8569f6a4d15156923196 (patch) | |
| tree | e374bcb829b5e0b3353402861f42b3884e1915d6 /src/kitemviews/kitemlistselectionmanager.h | |
| parent | bf20b404c820f00b6d75f0ad123b93cb45eb7487 (diff) | |
Fix issues with the anchor selection
Don't change the selection if the anchor is invalid. This fixes
the issue that items might get selected during changing a directory.
Diffstat (limited to 'src/kitemviews/kitemlistselectionmanager.h')
| -rw-r--r-- | src/kitemviews/kitemlistselectionmanager.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistselectionmanager.h b/src/kitemviews/kitemlistselectionmanager.h index dd4c3e4fc..f8c33bb79 100644 --- a/src/kitemviews/kitemlistselectionmanager.h +++ b/src/kitemviews/kitemlistselectionmanager.h @@ -61,11 +61,17 @@ public: void beginAnchoredSelection(int anchor); void endAnchoredSelection(); + + /** + * Sets the anchor to \a anchor and emits anchorChanged() if the + * anchor differs from the current anchor value. If no anchor selection is active (see + * KItemListSelectionManager::beginAnchoredSelection()) or the index + * is not within the available model items the anchor will not be modified. + */ void setAnchorItem(int anchor); int anchorItem() const; bool isAnchoredSelectionActive() const; - void setAnchoredSelectionActive(bool active); KItemModelBase* model() const; |
