search: Fix crash when disabling a stockpile category

Closes #678
develop
lethosor 2015-09-21 19:25:20 -04:00
parent 690cfb54a1
commit 62c903b7be
2 changed files with 13 additions and 1 deletions

@ -54,7 +54,9 @@ DFHack Future
help: now recognizes built-in commands, like "help"
manipulator: fixed crash when selecting custom professions when none are found
remotefortressreader: fixed crash when attempting to send map info when no map was loaded
search: fixed crash in unit list after cancelling a job
search:
- fixed crash in unit list after cancelling a job
- fixed crash when disabling stockpile category after searching in a subcategory
stockpiles: now checks/sanitizes filenames when saving
stocks: fixed a crash when right-clicking
steam-engine:

@ -1262,7 +1262,17 @@ public:
return &viewscreen->item_status;
}
bool should_check_input(set<df::interface_key> *input)
{
if (input->count(interface_key::STOCKPILE_SETTINGS_DISABLE) && !in_entry_mode() && !search_string.empty())
{
// Restore original list
clear_search();
reset_all();
}
return true;
}
};