aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/starwidget.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-10-19 01:34:57 +0300
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-10-19 14:04:38 +0300
commite9673938fb886a829e64ac595f96611dd14934fc (patch)
tree78809d1cb46232cf9f8a7615635c979478162623 /desktop-widgets/starwidget.cpp
parent305a35a48c17b1e5fa26347a1f4006033c827b6c (diff)
downloadsubsurface-e9673938fb886a829e64ac595f96611dd14934fc.tar.gz
printoptions.cpp: correctly remember the last selected template
To find the last selected template index in the combo box, comparing against `printOptions->p_template` would work fine, except the `on_printTemplate_currentIndexChanged()` slot updates `printOptions->p_template` each time QComboBox::addItem() is called. This makes the `for` loop to add new combo box items and find the index of the last selected template not possible. To work around the issue, a local QString variable `storedTemplate` is introduced and it does not change during the `for` loop. Fixes #595 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'desktop-widgets/starwidget.cpp')
0 files changed, 0 insertions, 0 deletions