(svn r17502) -Codechange [FS#3184]: Extend QueryStringBaseWindow to support windows with nested widgets (by Terkhen with a few tweaks).

This commit is contained in:
alberth
2009-09-11 18:52:56 +00:00
parent 4cb6451507
commit 669b7d01ac
3 changed files with 38 additions and 16 deletions

View File

@@ -75,7 +75,13 @@ struct OskWindow : public Window {
this->parent = parent;
assert(parent != NULL);
this->caption = (parent->widget[button].data != STR_NULL) ? parent->widget[button].data : parent->caption;
if (parent->widget != NULL) {
this->caption = (parent->widget[button].data != STR_NULL) ? parent->widget[button].data : parent->caption;
}
if (parent->nested_array != NULL) {
assert(parent->nested_array[button] != NULL);
this->caption = (parent->nested_array[button]->widget_data != STR_NULL) ? parent->nested_array[button]->widget_data : parent->caption;
}
this->qs = parent;
this->text_btn = button;