gui2: Fix cursor setter going out of scope as soon as it's created

Because I'm unbelievably smart, I forgot to name the cursor::setter
variable, so it becomes a temporary that exists for exactly one
statement before the dialog's window is displayed. Addressed this by
giving it a name.

Fixes #4618.
This commit is contained in:
Iris Morelle 2020-01-09 01:13:53 -03:00
parent 4489e896f4
commit 751043a692

View file

@ -86,7 +86,7 @@ bool modal_dialog::show(const unsigned auto_close_time)
pre_show(*window_);
{ // Scope the window stack
cursor::setter{cursor::NORMAL};
cursor::setter cur{cursor::NORMAL};
window_stack_handler push_window_stack(window_);
retval_ = window_->show(restore_, auto_close_time);
}