Skip to content

Commit f12bb8b

Browse files
committed
Remove duplicate dialogs on attempting to load bad files from command line.
1 parent 9fbf6bf commit f12bb8b

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/gui/app.cc

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,7 @@ wxBEGIN_EVENT_TABLE(Application, wxApp) EVT_TIMER(wxID_ANY, Application::OnSplas
8383

8484
// Process command line arguments, if any.
8585
for (int i = 1; i < argc; i++) {
86-
const AppLoadResult result = LoadFile(argv[i], nullptr);
87-
if (result == GBT_APP_OPEN_FAILED) {
88-
wxMessageBox(wxString::Format(_("Gambit could not open file for reading:\n%s"), argv[i]),
89-
_("Unable to open file"), wxOK | wxICON_ERROR, nullptr);
90-
}
91-
else if (result == GBT_APP_PARSE_FAILED) {
92-
wxMessageBox(wxString::Format(_("File is not in a format Gambit recognizes:\n%s"), argv[i]),
93-
_("Unable to read file"), wxOK | wxICON_ERROR, nullptr);
94-
}
86+
LoadFile(argv[i], nullptr);
9587
}
9688

9789
if (m_documents.empty()) {

0 commit comments

Comments
 (0)