Jeck - Quick fix for issue 370, issue 365, (and hopefully) issue 319 . Thanks for the report, Psy.
(Counts weren't being updated as often as they should be. Now they might be updated too often, but that's better than the alternative.)
This commit is contained in:
@@ -68,15 +68,19 @@ void GameStateDeckViewer::rotateCards(int direction){
|
||||
}
|
||||
void GameStateDeckViewer::rebuildFilters(){
|
||||
if(!filterMenu) filterMenu = NEW WGuiFilters("Filter by...",NULL);
|
||||
source = NEW WSrcDeckViewer(myDeck,myCollection);
|
||||
if(!source) source = NEW WSrcDeckViewer(myDeck,myCollection);
|
||||
filterMenu->setSrc(source);
|
||||
if(displayed_deck != myDeck) source->swapSrc();
|
||||
filterMenu->Finish(true);
|
||||
updateStats();
|
||||
source->updateCounts();
|
||||
}
|
||||
void GameStateDeckViewer::updateFilters(){
|
||||
if(!displayed_deck) return;
|
||||
filterMenu->recolorFilter(useFilter-1);
|
||||
filterMenu->Finish(true);
|
||||
source->updateCounts();
|
||||
updateStats();
|
||||
return;
|
||||
}
|
||||
void GameStateDeckViewer::loadIndexes(){
|
||||
|
||||
@@ -1381,7 +1381,7 @@ bool WGuiFilters::Finish(bool emptyset){
|
||||
source->addFilter(f);
|
||||
}
|
||||
}
|
||||
if(!source->Size() && !emptyset){
|
||||
if((!source->Size() && !emptyset)){
|
||||
source->clearFilters(); //TODO: Pop a "No results found" warning
|
||||
}
|
||||
}
|
||||
@@ -1601,6 +1601,7 @@ void WGuiFilterItem::updateValue(){
|
||||
case STATE_UNSET:
|
||||
SAFE_DELETE(mParent->subMenu);
|
||||
mState = STATE_CHOOSE_TYPE;
|
||||
SAFE_DELETE(mParent->subMenu);
|
||||
mParent->subMenu = NEW SimpleMenu(-1234,this,Constants::MENU_FONT,20,20,"Filter By...",10);
|
||||
if(mParent->isAvailable(FILTER_SET)){
|
||||
mParent->subMenu->Add(FILTER_SET,"Set");
|
||||
|
||||
Reference in New Issue
Block a user