From: Robin Dunn Date: Sun, 25 Nov 2001 02:34:43 +0000 (+0000) Subject: Honor the SetUseHorizontalScrollBar setting. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3928c4fd6631b4f9074c3eaa6eb370b556ad0ff7?ds=inline Honor the SetUseHorizontalScrollBar setting. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index 1effa1fe99..be6b36b4de 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -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; } diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 1effa1fe99..be6b36b4de 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -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; }