mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 02:48:11 +00:00
SystemMenu: Fix shutdown dialog
It was shutting down even if selected Restart.
This commit is contained in:
parent
b8dc1fc195
commit
abdf36b171
1 changed files with 4 additions and 3 deletions
|
@ -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 {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue