Issue #54: Final bugfix

This commit is contained in:
Jakub Melka 2023-12-17 18:14:25 +01:00
parent e9ca3a4a82
commit e87b14dc3a
1 changed files with 10 additions and 0 deletions

View File

@ -2625,6 +2625,11 @@ void PDFProgramController::onActionBookmarkGoToPrevious()
void PDFProgramController::onActionBookmarkExport()
{
if (!m_pdfDocument)
{
return;
}
QFileInfo fileInfo(m_fileInfo.originalFileName);
QString saveFileName = QFileDialog::getSaveFileName(m_mainWindow, tr("Export Bookmarks As"), fileInfo.dir().absoluteFilePath(m_fileInfo.originalFileName).replace(".pdf", ".json"), tr("JSON (*.json);;All files (*.*)"));
if (!saveFileName.isEmpty())
@ -2635,6 +2640,11 @@ void PDFProgramController::onActionBookmarkExport()
void PDFProgramController::onActionBookmarkImport()
{
if (!m_pdfDocument)
{
return;
}
QFileInfo fileInfo(m_fileInfo.originalFileName);
QString fileName = QFileDialog::getOpenFileName(m_mainWindow, tr("Select PDF document"), fileInfo.dir().absolutePath(), tr("JSON (*.json)"));
if (!fileName.isEmpty())