summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-07-21 22:59:08 +0200
committerCarl Hetherington <cth@carlh.net>2020-07-21 22:59:08 +0200
commit12b57d96fd343f0574f592d418a1572dd41d1a59 (patch)
treea1d0c380ac4551b36c37fb2e6df30d14d14f5b31
parent660caac5a4b023050fe04aaf1a299677d65050f5 (diff)
Don't enable OK button for the export dialogue until a path
has been selected. If OK is clicked too early you get a -13 error on Windows.
-rw-r--r--src/wx/export_dialog.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wx/export_dialog.cc b/src/wx/export_dialog.cc
index 5fc4036fe..ce6e1e2e9 100644
--- a/src/wx/export_dialog.cc
+++ b/src/wx/export_dialog.cc
@@ -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());
}