Make robot_dialog_handler return window_event_result::close instead of closing itself
This ensures the event system will know what's going on.
This commit is contained in:
parent
5322ce4a0f
commit
acc595ba16
|
@ -715,8 +715,7 @@ window_event_result robot_dialog_handler(UI_DIALOG *dlg,const d_event &event, ro
|
||||||
Update_flags |= UF_WORLD_CHANGED;
|
Update_flags |= UF_WORLD_CHANGED;
|
||||||
if (GADGET_PRESSED(r->quitButton.get()) || keypress == KEY_ESC)
|
if (GADGET_PRESSED(r->quitButton.get()) || keypress == KEY_ESC)
|
||||||
{
|
{
|
||||||
robot_close_window();
|
return window_event_result::close;
|
||||||
return window_event_result::handled;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
r->old_object = Cur_object_index;
|
r->old_object = Cur_object_index;
|
||||||
|
|
Loading…
Reference in a new issue