mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
Add Select All functionality, closes #19
This commit is contained in:
@@ -40,6 +40,9 @@ bool ItemList::canSelectPrevious() const {
|
||||
bool ItemList::canSelectNext() const {
|
||||
return selected_item_pos >= 0 && static_cast<size_t>(selected_item_pos + 1) < sorted_list.size();
|
||||
}
|
||||
bool ItemList::canSelectAll() const {
|
||||
return sorted_list.size() > 0 && !(GetWindowStyle() & wxLC_SINGLE_SEL);
|
||||
}
|
||||
void ItemList::selectPrevious() {
|
||||
assert(selected_item_pos >= 1);
|
||||
focusNone();
|
||||
@@ -54,6 +57,12 @@ void ItemList::selectFirst() {
|
||||
if (sorted_list.empty()) return;
|
||||
selectItemPos(0, true);
|
||||
}
|
||||
void ItemList::doSelectAll() {
|
||||
long count = GetItemCount();
|
||||
for (long pos = 0; pos < count; ++pos) {
|
||||
Select(pos,true);
|
||||
}
|
||||
}
|
||||
|
||||
bool ItemList::doCut() {
|
||||
// cut = copy + delete
|
||||
|
||||
Reference in New Issue
Block a user