Checklists: Fix bug where first checklist has multiple pages
The change introduced in commit 8c7fc119
to go to the last checklist
on open causes a problem when the first checklist has multiple pages.
If the last opened checklist did not have multiple pages, the previous
and next page buttons are still shown.
This commit runs the same binding as used by the combo box to reset
the visibility of these buttons immediately before the page is
displayed.
This commit is contained in:
parent
5d78ffa668
commit
e177cf535a
1 changed files with 6 additions and 0 deletions
|
@ -214,6 +214,12 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
var s = getprop("/sim/gui/dialogs/checklist/selected-checklist");
|
||||
setprop("/sim/gui/dialogs/checklist/selected-checklist-max-pages", checklist_size[s]);
|
||||
setprop("/sim/gui/dialogs/checklist/selected-page", 0);
|
||||
setprop("/sim/gui/dialogs/checklist/next-available", 1);
|
||||
setprop("/sim/gui/dialogs/checklist/selected-page-text", "1 / " ~ checklist_size[s]);
|
||||
|
||||
} else {
|
||||
var group = gui.findElementByName(dlgRoot, "checklist-table-group");
|
||||
|
|
Loading…
Reference in a new issue