mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #133: Rectangle selector when choosing the page of the PDF
This commit is contained in:
@ -1900,6 +1900,17 @@ void PDFProgramController::onDocumentReadingFinished()
|
||||
QMessageBox::warning(m_mainWindow, QApplication::applicationDisplayName(), requirementResult.message);
|
||||
}
|
||||
|
||||
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::organizationName(), QCoreApplication::applicationName());
|
||||
|
||||
settings.beginGroup("LastOpenedDocumentPages");
|
||||
QVariant lastOpenedPage = settings.value(m_fileInfo.absoluteFilePath, QVariant());
|
||||
settings.endGroup();
|
||||
|
||||
if (lastOpenedPage.isValid())
|
||||
{
|
||||
m_pdfWidget->getDrawWidgetProxy()->goToPage(lastOpenedPage.toInt());
|
||||
}
|
||||
|
||||
m_mainWindowInterface->setStatusBarMessage(tr("Document '%1' was successfully loaded!").arg(m_fileInfo.fileName), 4000);
|
||||
break;
|
||||
}
|
||||
@ -2036,6 +2047,20 @@ void PDFProgramController::setDocument(pdf::PDFModifiedDocument document, bool i
|
||||
|
||||
void PDFProgramController::closeDocument()
|
||||
{
|
||||
if (m_pdfDocument && !m_fileInfo.absoluteFilePath.isEmpty())
|
||||
{
|
||||
std::vector<pdf::PDFInteger> pages = m_pdfWidget->getDrawWidget()->getCurrentPages();
|
||||
|
||||
if (!pages.empty())
|
||||
{
|
||||
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::organizationName(), QCoreApplication::applicationName());
|
||||
|
||||
settings.beginGroup("LastOpenedDocumentPages");
|
||||
settings.setValue(m_fileInfo.absoluteFilePath, pages.front());
|
||||
settings.endGroup();
|
||||
}
|
||||
}
|
||||
|
||||
m_signatures.clear();
|
||||
setDocument(pdf::PDFModifiedDocument(), true);
|
||||
m_pdfDocument.reset();
|
||||
|
@ -1,6 +1,7 @@
|
||||
CURRENT:
|
||||
- Issue #137: Redaction - Cannot convert '#000000' to color value
|
||||
- Issue #134: Add search bar for actions
|
||||
- Issue #133: Rectangle selector when choosing the page of the PDF
|
||||
- Issue #129: Cannot compile with lcms 2.16
|
||||
- Issue #128: Create list of markup annotations
|
||||
- Issue #126: Remove <QtCore> include from main headers
|
||||
|
Reference in New Issue
Block a user