Fix order of scrollbar update when texture scale changes. Closes #2377

* We need to update the scrollbar bounds first based on the current zoom level,
  then change the scroll position. Otherwise the scroll will be visually correct
  but the scrollbars won't match.
This commit is contained in:
baldurk
2021-10-04 12:10:56 +01:00
parent 4a44d76426
commit bfbc9a3e48
+2 -2
View File
@@ -3338,11 +3338,11 @@ void TextureViewer::UI_SetScale(float s, int x, int y)
newPos = QPoint((int)(newPos.x() * scaleDelta), (int)(newPos.y() * scaleDelta));
newPos += QPoint(x, y);
setScrollPosition(newPos);
setCurrentZoomValue(m_TexDisplay.scale);
UI_CalcScrollbars();
setScrollPosition(newPos);
}
void TextureViewer::setCurrentZoomValue(float zoom)