r19178 by craig - #10729: Allow page up/down even when at item is selected
scribus-commit
scribus-commit at lists.scribus.net
Tue Jun 3 20:14:00 UTC 2014
Author: craig
Date: Tue Jun 3 20:14:00 2014
New Revision: 19178
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19178
Log:
#10729: Allow page up/down even when at item is selected
Modified:
trunk/Scribus/scribus/canvasmode.cpp
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19178&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Tue Jun 3 20:14:00 2014
@@ -1225,7 +1225,6 @@
if (m_doc->m_Selection->count() == 0)
{
- int pg;
int wheelVal = prefsManager->mouseWheelJump();
if ((buttonModifiers & Qt::ShiftModifier) && !(buttonModifiers & Qt::ControlModifier) && !(buttonModifiers & Qt::AltModifier))
wheelVal = qMax(qRound(wheelVal / 10.0), 1);
@@ -1237,38 +1236,6 @@
m_view->requestMode(modeNormal);
else
m_view->requestMode(modePanning);
- return;
- break;
- case Qt::Key_PageUp:
- if (m_doc->masterPageMode() || m_doc->symbolEditMode())
- m_view->scrollBy(0, -prefsManager->mouseWheelJump());
- else
- {
- pg = m_doc->currentPageNumber();
- if ((buttonModifiers & Qt::ShiftModifier) && !(buttonModifiers & Qt::ControlModifier) && !(buttonModifiers & Qt::AltModifier))
- pg--;
- else
- pg -= m_doc->pageSets()[m_doc->pagePositioning()].Columns;
- if (pg > -1)
- m_view->GotoPage(pg);
- }
- m_keyRepeat = false;
- return;
- break;
- case Qt::Key_PageDown:
- if (m_doc->masterPageMode() || m_doc->symbolEditMode())
- m_view->scrollBy(0, prefsManager->mouseWheelJump());
- else
- {
- pg = m_doc->currentPageNumber();
- if ((buttonModifiers & Qt::ShiftModifier) && !(buttonModifiers & Qt::ControlModifier) && !(buttonModifiers & Qt::AltModifier))
- pg++;
- else
- pg += m_doc->pageSets()[m_doc->pagePositioning()].Columns;
- if (pg < static_cast<int>(m_doc->Pages->count()))
- m_view->GotoPage(pg);
- }
- m_keyRepeat = false;
return;
break;
case Qt::Key_Left:
@@ -1320,6 +1287,43 @@
break;
}
}
+ //Allow page up/down even when items are selected
+ switch (kk)
+ {
+ case Qt::Key_PageUp:
+ if (m_doc->masterPageMode() || m_doc->symbolEditMode())
+ m_view->scrollBy(0, -prefsManager->mouseWheelJump());
+ else
+ {
+ int pg = m_doc->currentPageNumber();
+ if ((buttonModifiers & Qt::ShiftModifier) && !(buttonModifiers & Qt::ControlModifier) && !(buttonModifiers & Qt::AltModifier))
+ pg--;
+ else
+ pg -= m_doc->pageSets()[m_doc->pagePositioning()].Columns;
+ if (pg > -1)
+ m_view->GotoPage(pg);
+ }
+ m_keyRepeat = false;
+ return;
+ break;
+ case Qt::Key_PageDown:
+ if (m_doc->masterPageMode() || m_doc->symbolEditMode())
+ m_view->scrollBy(0, prefsManager->mouseWheelJump());
+ else
+ {
+ int pg = m_doc->currentPageNumber();
+ if ((buttonModifiers & Qt::ShiftModifier) && !(buttonModifiers & Qt::ControlModifier) && !(buttonModifiers & Qt::AltModifier))
+ pg++;
+ else
+ pg += m_doc->pageSets()[m_doc->pagePositioning()].Columns;
+ if (pg < static_cast<int>(m_doc->Pages->count()))
+ m_view->GotoPage(pg);
+ }
+ m_keyRepeat = false;
+ return;
+ break;
+ }
+
/** Now if we have an item selected
* - In normal mode we can:
* -- Use backspace or delete to delete the item
More information about the scribus-commit
mailing list