Skip to content

Commit

Permalink
Check filename before save on Save a Copy As...
Browse files Browse the repository at this point in the history
Closes #506
  • Loading branch information
detinho authored and dail8859 committed Mar 28, 2024
1 parent b6b0ccc commit 928ca38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/NotepadNext/dialogs/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,10 @@ bool MainWindow::saveCopyAsDialog()
QString selectedFilter = app->getFileDialogFilterForLanguage(editor->languageName);
QString fileName = FileDialogHelpers::getSaveFileName(this, tr("Save a Copy As"), dialogDir, filter, &selectedFilter);

if (fileName.size() == 0) {
return false;
}

return saveCopyAs(fileName);
}

Expand Down

0 comments on commit 928ca38

Please sign in to comment.