Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2015-11-03 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:57 +0300
commit7c8a265a15125b64808e695882acd2a0298ebce4 (patch)
tree81fc9fdedc6b70b979a3dfe3a3041457a6e9468d /CPP/7zip/UI/FileManager/PanelSelect.cpp
parenta663a6deb7a150f935fac7efdbf4d53d27369594 (diff)
15.1015.10
Diffstat (limited to 'CPP/7zip/UI/FileManager/PanelSelect.cpp')
-rw-r--r--CPP/7zip/UI/FileManager/PanelSelect.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/CPP/7zip/UI/FileManager/PanelSelect.cpp b/CPP/7zip/UI/FileManager/PanelSelect.cpp
index de9cf4b5..72cb4838 100644
--- a/CPP/7zip/UI/FileManager/PanelSelect.cpp
+++ b/CPP/7zip/UI/FileManager/PanelSelect.cpp
@@ -82,20 +82,21 @@ void CPanel::OnInsert()
LVIS_CUT : 0;
_listView.SetItemState(focusedItem, state, LVIS_CUT);
// _listView.SetItemState_Selected(focusedItem);
-
*/
+
int focusedItem = _listView.GetFocusedItem();
if (focusedItem < 0)
return;
+
int realIndex = GetRealItemIndex(focusedItem);
- bool isSelected = !_selectedStatusVector[realIndex];
if (realIndex != kParentIndex)
+ {
+ bool isSelected = !_selectedStatusVector[realIndex];
_selectedStatusVector[realIndex] = isSelected;
-
- if (!_mySelectMode)
- _listView.SetItemState_Selected(focusedItem, isSelected);
-
- _listView.RedrawItem(focusedItem);
+ if (!_mySelectMode)
+ _listView.SetItemState_Selected(focusedItem, isSelected);
+ _listView.RedrawItem(focusedItem);
+ }
int nextIndex = focusedItem + 1;
if (nextIndex < _listView.GetItemCount())
@@ -112,6 +113,8 @@ void CPanel::OnUpWithShift()
if (focusedItem < 0)
return;
int index = GetRealItemIndex(focusedItem);
+ if (index == kParentIndex)
+ return;
_selectedStatusVector[index] = !_selectedStatusVector[index];
_listView.RedrawItem(index);
}
@@ -122,6 +125,8 @@ void CPanel::OnDownWithShift()
if (focusedItem < 0)
return;
int index = GetRealItemIndex(focusedItem);
+ if (index == kParentIndex)
+ return;
_selectedStatusVector[index] = !_selectedStatusVector[index];
_listView.RedrawItem(index);
}