diff --git a/libs/ui/source/file_dialog.cpp b/libs/ui/source/file_dialog.cpp index 8403f4a8..32862bd2 100644 --- a/libs/ui/source/file_dialog.cpp +++ b/libs/ui/source/file_dialog.cpp @@ -159,6 +159,8 @@ namespace psemek::ui auto confirm_button = options.element_factory.make_button(options.type == file_dialog_type::save ? "Save" : "Open"); auto cancel_button = options.element_factory.make_button("Cancel"); + confirm_button->set_hidden(true); + bottom_layout->set(0, 1, status_label); bottom_layout->set(0, 2, confirm_button); bottom_layout->set(0, 3, cancel_button); @@ -301,6 +303,7 @@ namespace psemek::ui path_edit->on_text_entered([=](std::u32string_view const & text_u32){ std::string text = util::to_utf8(std::u32string(text_u32)); *selected_path = *current_path / text; + confirm_button->set_hidden(text.empty()); }, false); cancel_button->on_click([=]{