mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 17:47:18 +00:00
SystemMenu: Fix shutdown dialog
It was shutting down even if selected Restart.
This commit is contained in:
@@ -51,9 +51,10 @@ static const Vector<Option> options = {
|
||||
|
||||
Vector<char const*> ShutdownDialog::show()
|
||||
{
|
||||
auto rc = ShutdownDialog::construct()->exec();
|
||||
if (rc == ExecResult::ExecOK)
|
||||
return options[rc].cmd;
|
||||
auto dialog = ShutdownDialog::construct();
|
||||
auto rc = dialog->exec();
|
||||
if (rc == ExecResult::ExecOK && dialog->m_selected_option != -1)
|
||||
return options[dialog->m_selected_option].cmd;
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user