X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Ftools%2Fdvdomatic.cc;h=6c27892b0806760a950d5559facbc3e26abe8286;hp=a0e7f0de85e2f0f1f1b73487eaf8bcc742406715;hb=d62877ae6c4e316e43f4052e4b9ba673610012cf;hpb=5859b758e3a6e0191ce12e77b636c7def58bbc3b diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc index a0e7f0de8..6c27892b0 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dvdomatic.cc @@ -314,8 +314,16 @@ private: void file_open (wxCommandEvent &) { wxDirDialog* c = new wxDirDialog (this, _("Select film to open"), wxStandardPaths::Get().GetDocumentsDir(), wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST); - int const r = c->ShowModal (); - + int r; + while (1) { + r = c->ShowModal (); + if (r == wxID_OK && c->GetPath() == wxStandardPaths::Get().GetDocumentsDir()) { + error_dialog (this, _("You did not select a folder. Make sure that you select a folder before clicking Open.")); + } else { + break; + } + } + if (r == wxID_OK) { maybe_save_then_delete_film (); try {