Don't enable OK button for the export dialogue until a path
authorCarl Hetherington <cth@carlh.net>
Tue, 21 Jul 2020 20:59:08 +0000 (22:59 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 21 Jul 2020 20:59:08 +0000 (22:59 +0200)
has been selected.  If OK is clicked too early you get a -13
error on Windows.

src/wx/export_dialog.cc

index 5fc4036feddfce2df9b14bb97692dee26a5cf7a7..ce6e1e2e98980fdd44be7c5b3fcbdb69cdc8ca3a 100644 (file)
@@ -156,5 +156,6 @@ void
 ExportDialog::file_changed ()
 {
        wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK, this));
-       ok->Enable (_file->GetPath().Length() > 0);
+       DCPOMATIC_ASSERT (ok);
+       ok->Enable (path().is_absolute());
 }