diff --git a/apps/openmw/mwgui/formatting.cpp b/apps/openmw/mwgui/formatting.cpp index f7188c8b60..9c918e6267 100644 --- a/apps/openmw/mwgui/formatting.cpp +++ b/apps/openmw/mwgui/formatting.cpp @@ -233,7 +233,8 @@ namespace MWGui } // insert last page - pag << Paginator::Page(pag.getStartTop(), pag.getStartTop() + pag.getPageHeight()); + if (pag.getStartTop() != pag.getCurrentTop()) + pag << Paginator::Page(pag.getStartTop(), pag.getStartTop() + pag.getPageHeight()); paper->setSize(paper->getWidth(), pag.getCurrentTop()); @@ -301,7 +302,7 @@ namespace MWGui mPaginator.setStartTop(newStartTop); } - mPaginator.modifyCurrentTop(getHeight()); + mPaginator.setCurrentTop(newTop); } int GraphicElement::pageSplit() diff --git a/apps/openmw/mwgui/formatting.hpp b/apps/openmw/mwgui/formatting.hpp index f119422c9c..cf55b36fb9 100644 --- a/apps/openmw/mwgui/formatting.hpp +++ b/apps/openmw/mwgui/formatting.hpp @@ -81,8 +81,6 @@ namespace MWGui void setStartTop(int top) { mStartTop = top; } void setCurrentTop(int top) { mCurrentTop = top; } - void modifyStartTop(int mod) { mStartTop += mod; } - void modifyCurrentTop(int mod) { mCurrentTop += mod; } Paginator & operator<<(const Page & page) {