mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
KeyboardMapper: Add GUI alert in case load from file fails
Previously there was no visual clue letting the user know that loading from file failed.
This commit is contained in:
parent
b9980ffd07
commit
484ec94624
1 changed files with 2 additions and 1 deletions
|
@ -127,7 +127,8 @@ void KeyboardMapperWidget::load_from_file(String filename)
|
||||||
{
|
{
|
||||||
auto result = Keyboard::CharacterMapFile::load_from_file(filename);
|
auto result = Keyboard::CharacterMapFile::load_from_file(filename);
|
||||||
if (!result.has_value()) {
|
if (!result.has_value()) {
|
||||||
dbgln("Failed to load character map from file {}", filename);
|
auto error_message = String::formatted("Failed to load character map from file {}", filename);
|
||||||
|
GUI::MessageBox::show(window(), error_message, "Error", GUI::MessageBox::Type::Error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue