Skip to content

Commit

Permalink
window: Autofill current filename for file to export to PDF
Browse files Browse the repository at this point in the history
Fixes #281.
  • Loading branch information
mitya57 committed May 28, 2017
1 parent d4c9d92 commit ebc0cdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ReText/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,8 @@ def standardPrinter(self, title):
def savePdf(self):
fileName = QFileDialog.getSaveFileName(self,
self.tr("Export document to PDF"),
"", self.tr("PDF files (*.pdf)"))[0]
self.currentTab.getBaseName() + ".pdf",
self.tr("PDF files (*.pdf)"))[0]
if fileName:
if not QFileInfo(fileName).suffix():
fileName += ".pdf"
Expand Down

0 comments on commit ebc0cdc

Please sign in to comment.