]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/stc/ScintillaWX.cpp
Honor the SetUseHorizontalScrollBar setting.
[wxWidgets.git] / contrib / src / stc / ScintillaWX.cpp
index 1effa1fe99d8ba60ffe677b52ad69f3cff1690ae..be6b36b4de86b72d7623bf87b978c87583805040 100644 (file)
@@ -214,11 +214,13 @@ bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) {
         modified = true;
     }
 
-    sbMax    = wMain.GetID()->GetScrollRange(wxHORIZONTAL);
-    sbThumb  = wMain.GetID()->GetScrollThumb(wxHORIZONTAL);
-    if ((sbMax != H_SCROLL_MAX) || (sbThumb != H_SCROLL_STEP)) {
-        wMain.GetID()->SetScrollbar(wxHORIZONTAL, 0, H_SCROLL_STEP, H_SCROLL_MAX);
-        modified = true;
+    if (horizontalScrollBarVisible) {
+        sbMax    = wMain.GetID()->GetScrollRange(wxHORIZONTAL);
+        sbThumb  = wMain.GetID()->GetScrollThumb(wxHORIZONTAL);
+        if ((sbMax != H_SCROLL_MAX) || (sbThumb != H_SCROLL_STEP)) {
+            wMain.GetID()->SetScrollbar(wxHORIZONTAL, 0, H_SCROLL_STEP, H_SCROLL_MAX);
+            modified = true;
+        }
     }
     return modified;
 }