Win32: Remove sscheck on SetScrollInfo - it returns the scrollbar position

...which can be zero.

Fixes: https://github.com/solvespace/solvespace/issues/817
pull/828/head
ruevs 2020-11-24 19:36:26 +02:00 committed by phkahler
parent bb5994ed70
commit 5d173694e7
1 changed files with 2 additions and 2 deletions

View File

@ -1342,7 +1342,7 @@ public:
si.nMin = (UINT)(min * SCROLLBAR_UNIT); si.nMin = (UINT)(min * SCROLLBAR_UNIT);
si.nMax = (UINT)(max * SCROLLBAR_UNIT); si.nMax = (UINT)(max * SCROLLBAR_UNIT);
si.nPage = (UINT)(pageSize * SCROLLBAR_UNIT); si.nPage = (UINT)(pageSize * SCROLLBAR_UNIT);
sscheck(SetScrollInfo(hWindow, SB_VERT, &si, /*redraw=*/TRUE)); SetScrollInfo(hWindow, SB_VERT, &si, /*redraw=*/TRUE); // Returns scrollbar position
} }
double GetScrollbarPosition() override { double GetScrollbarPosition() override {
@ -1366,7 +1366,7 @@ public:
return; return;
si.nPos = (int)(pos * SCROLLBAR_UNIT); si.nPos = (int)(pos * SCROLLBAR_UNIT);
sscheck(SetScrollInfo(hWindow, SB_VERT, &si, /*redraw=*/TRUE)); SetScrollInfo(hWindow, SB_VERT, &si, /*redraw=*/TRUE); // Returns scrollbar position
// Windows won't synthesize a WM_VSCROLL for us here. // Windows won't synthesize a WM_VSCROLL for us here.
if(onScrollbarAdjusted) { if(onScrollbarAdjusted) {