Remove the 30-item limit in shops

This commit is contained in:
2019-12-02 01:16:34 -05:00
parent fd8bd913cc
commit 6f96222c37
10 changed files with 88 additions and 86 deletions

View File

@@ -81,14 +81,17 @@ bool cStack::setPage(size_t n) {
for(auto p : controls) {
const std::string& id = p.first;
cControl& ctrl = *p.second;
storage[curPage][id] = ctrl.store();
if(!ctrl.triggerFocusHandler(*parent, id, true))
failed = true;
if(!failed) {
ctrl.restore(storage[n][id]);
if(focus == &ctrl && !ctrl.triggerFocusHandler(*parent, id, false)) {
// Only trigger focus handlers if the current page still exists.
if(curPage < nPages) {
storage[curPage][id] = ctrl.store();
if(!ctrl.triggerFocusHandler(*parent, id, true))
failed = true;
ctrl.restore(storage[curPage][id]);
if(!failed) {
ctrl.restore(storage[n][id]);
if(focus == &ctrl && !ctrl.triggerFocusHandler(*parent, id, false)) {
failed = true;
ctrl.restore(storage[curPage][id]);
}
}
}
}