summaryrefslogtreecommitdiffstats
path: root/src/Gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/Gui')
-rw-r--r--src/Gui/RenderArea.cpp10
-rw-r--r--src/Gui/RenderArea.h1
2 files changed, 4 insertions, 7 deletions
diff --git a/src/Gui/RenderArea.cpp b/src/Gui/RenderArea.cpp
index 4d250f8..8062b80 100644
--- a/src/Gui/RenderArea.cpp
+++ b/src/Gui/RenderArea.cpp
@@ -193,15 +193,13 @@ void RenderArea::updateScrollbars(float x, float y) {
get_window()->thaw_updates();
- updateScrollingWithSize(2*xVal, 2*yVal);
+ updateScrolling();
}
void RenderArea::updateScrolling() {
- updateScrollingWithSize(hScrollbar->get_adjustment()->get_upper()-hScrollbar->get_adjustment()->get_lower(),
- vScrollbar->get_adjustment()->get_upper()-vScrollbar->get_adjustment()->get_lower());
-}
-
-void RenderArea::updateScrollingWithSize(float imageWidth, float imageHeight) {
+ const float imageWidth = hScrollbar->get_adjustment()->get_upper()-hScrollbar->get_adjustment()->get_lower();
+ const float imageHeight = vScrollbar->get_adjustment()->get_upper()-vScrollbar->get_adjustment()->get_lower();
+
if(hScrollbar) {
if(imageWidth < getViewWidth())
xCenter = 0;
diff --git a/src/Gui/RenderArea.h b/src/Gui/RenderArea.h
index 61e5291..59498d4 100644
--- a/src/Gui/RenderArea.h
+++ b/src/Gui/RenderArea.h
@@ -79,7 +79,6 @@ class RenderArea : public Gtk::DrawingArea {
void updateViewport();
void updateScrollbars(float x = 0.5f, float y = 0.5f);
void updateScrolling();
- void updateScrollingWithSize(float imageWidth, float imageHeight);
bool gdkGLBegin() {
GtkWidget *widget = GTK_WIDGET(gobj());