From 405d17dead06b7d3558fa7e9d438ed8fccd45b31 Mon Sep 17 00:00:00 2001 From: usrtrv Date: Mon, 30 Jan 2017 23:37:41 -0700 Subject: [PATCH] fix for xournalpp/xournalpp/issues/203 --- src/gui/Layout.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/Layout.cpp b/src/gui/Layout.cpp index da28080f..2f6ac283 100644 --- a/src/gui/Layout.cpp +++ b/src/gui/Layout.cpp @@ -63,12 +63,11 @@ void Layout::checkSelectedPage() int viewHeight = allocation.height; int viewWidth = allocation.width; - bool twoPages = control->getSettings()->isShowTwoPages(); + bool twoPages = control->getSettings()->isShowTwoPages() && this->view->viewPagesLen > 1; if (scrollY < 1) { - if (twoPages && this->view->viewPagesLen > 1 && - this->view->viewPages[1]->isSelected()) + if (twoPages && this->view->viewPages[1]->isSelected()) { // page 2 already selected }