GUI2/Window: fixed behavior regression from 2416f10ddd

The on-OK-only exit hook wrapper was always returning true.
This commit is contained in:
Charles Dang 2017-10-05 13:46:30 +11:00
parent ffa581d88b
commit d957326828

View file

@ -455,7 +455,7 @@ public:
void set_exit_hook_ok_only(std::function<bool(window&)> func)
{
exit_hook_ = [func](window& w)->bool { return (w.get_retval() == OK && func(w)) || true; };
exit_hook_ = [func](window& w)->bool { return w.get_retval() != OK || func(w); };
}
/**