mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2024-12-27 08:42:48 +01:00
Issue #139: Changing page layout reset the current page
This commit is contained in:
parent
8338d7d85d
commit
1a66b804a2
@ -1328,7 +1328,24 @@ void PDFDrawWidgetProxy::setPageLayout(PageLayout pageLayout)
|
||||
{
|
||||
if (getPageLayout() != pageLayout)
|
||||
{
|
||||
std::optional<PDFInteger> pageIndex;
|
||||
|
||||
if (m_widget)
|
||||
{
|
||||
std::vector<PDFInteger> currentPages = m_widget->getDrawWidget()->getCurrentPages();
|
||||
if (!currentPages.empty())
|
||||
{
|
||||
pageIndex = currentPages.front();
|
||||
}
|
||||
}
|
||||
|
||||
m_controller->setPageLayout(pageLayout);
|
||||
|
||||
if (pageIndex.has_value())
|
||||
{
|
||||
goToPage(*pageIndex);
|
||||
}
|
||||
|
||||
Q_EMIT pageLayoutChanged();
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
CURRENT:
|
||||
- Issue #139: Changing page layout reset the current page
|
||||
- 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
|
||||
|
Loading…
Reference in New Issue
Block a user