From 484ec946246f75f318d1aedf4ad987d84d2b5fd0 Mon Sep 17 00:00:00 2001 From: NonStdModel Date: Fri, 4 Jun 2021 20:19:01 +0200 Subject: [PATCH] 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. --- Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp index 77322956b84..3a06fd55851 100644 --- a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp +++ b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp @@ -127,7 +127,8 @@ void KeyboardMapperWidget::load_from_file(String filename) { auto result = Keyboard::CharacterMapFile::load_from_file(filename); 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; }