Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
44ec3bf3
Commit
44ec3bf3
authored
Jul 06, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sorting of card list distributed to all card lists that share the same game.
parent
a5013d72
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
src/gui/control/card_list.cpp
src/gui/control/card_list.cpp
+9
-0
src/gui/control/card_list.hpp
src/gui/control/card_list.hpp
+2
-0
src/gui/control/item_list.hpp
src/gui/control/item_list.hpp
+1
-1
No files found.
src/gui/control/card_list.cpp
View file @
44ec3bf3
...
...
@@ -224,6 +224,15 @@ void CardListBase::rebuild() {
refreshList
();
}
void
CardListBase
::
sortBy
(
long
column
,
bool
ascending
)
{
// sort all card lists for this game
FOR_EACH
(
card_list
,
card_lists
)
{
if
(
card_list
->
set
&&
card_list
->
set
->
game
==
set
->
game
)
{
card_list
->
ItemList
::
sortBy
(
column
,
ascending
);
}
}
}
// ----------------------------------------------------------------------------- : CardListBase : Columns
void
CardListBase
::
storeColumns
()
{
...
...
src/gui/control/card_list.hpp
View file @
44ec3bf3
...
...
@@ -84,6 +84,8 @@ class CardListBase : public ItemList, public SetView {
virtual
void
onRebuild
()
{}
/// Can the card list be modified?
virtual
bool
allowModify
()
const
{
return
false
;
}
/// Sort all card lists
virtual
void
sortBy
(
long
column
,
bool
ascending
);
/// Send an 'item selected' event for the currently selected item (selected_item)
virtual
void
sendEvent
();
...
...
src/gui/control/item_list.hpp
View file @
44ec3bf3
...
...
@@ -66,7 +66,7 @@ class ItemList : public wxListView {
/// Return the card at the given position in the sorted list
inline
const
VoidP
&
getItem
(
long
pos
)
const
{
return
sorted_list
[
pos
];
}
/// Sort by the given column
void
sortBy
(
long
column
,
bool
ascending
);
v
irtual
v
oid
sortBy
(
long
column
,
bool
ascending
);
/// Refresh the card list (resort, refresh and reselect current item)
void
refreshList
();
/// Set the image of a column header (fixes wx bug)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment