mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-05-06 11:43:56 +00:00
Improve import
This commit is contained in:
parent
8a9b920a5e
commit
aae19085bb
4 changed files with 21 additions and 4 deletions
|
@ -34,10 +34,13 @@ void GameListManager::DisplayRow(long id){
|
|||
BG_OPEN(index);
|
||||
if(std::find(deleted_games.begin(), deleted_games.end(), row.id) != deleted_games.end())
|
||||
BG_DELETE(index);
|
||||
if(std::find(imported_games.begin(), imported_games.end(), row.id) != imported_games.end())
|
||||
BG_IMPORT(index);
|
||||
}
|
||||
|
||||
void GameListManager::Clear(){
|
||||
game_list->DeleteAllItems();
|
||||
imported_games.clear();
|
||||
deleted_games.clear();
|
||||
opened_games.clear();
|
||||
rows.clear();
|
||||
|
@ -58,6 +61,11 @@ void GameListManager::MarkItemAsDeleted(long item){
|
|||
BG_DELETE(item);
|
||||
}
|
||||
|
||||
void GameListManager::MarkItemAsImported(long item){
|
||||
imported_games.push_back(rows[item].id);
|
||||
BG_IMPORT(item);
|
||||
}
|
||||
|
||||
void GameListManager::SortBy(short col){
|
||||
ClearDisplayedRow();
|
||||
switch(col){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue