Diffstat (limited to 'noncore/graphics/drawpad/drawpadcanvas.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/drawpadcanvas.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/noncore/graphics/drawpad/drawpadcanvas.cpp b/noncore/graphics/drawpad/drawpadcanvas.cpp index 5437068..05dd408 100644 --- a/noncore/graphics/drawpad/drawpadcanvas.cpp +++ b/noncore/graphics/drawpad/drawpadcanvas.cpp @@ -346,6 +346,19 @@ void DrawPadCanvas::selectPage(Page* page) emit pageBackupsChanged(); } +void DrawPadCanvas::selectPage(uint pagePosition) +{ + m_pages.at(pagePosition - 1); + m_pageBackups.clear(); + m_pageBackups.append(new Page(*(m_pages.current()))); + + resizeContents(m_pages.current()->width(), m_pages.current()->height()); + viewport()->update(); + + emit pagesChanged(); + emit pageBackupsChanged(); +} + void DrawPadCanvas::backupPage() { m_pages.current()->setLastModified(QDateTime::currentDateTime()); |