┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmol Godbole <[email protected]>2023-09-03 12:33:21 -0500
committerAmol Godbole <[email protected]>2023-09-05 04:58:05 +0000
commit0e4d428e84099bf5d76e81640a2417d5457d83a4 (patch)
treed4dca117661281f2c65774757e861aef46b4933a
parent385146a1e8bd6762af9945756cc27e5a46b4f98a (diff)
DolphinView: Reset scrollbars before changing view mode
When view modes are changed, the scrollbars are not reset. This can cause the scroll area to be moved out of view after changing the view mode, making the view unusable. This commit resets the scrollbars. BUG: 393152
-rw-r--r--src/views/dolphinview.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index a91d76358..d0db814e4 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -279,6 +279,10 @@ bool DolphinView::isActive() const
void DolphinView::setViewMode(Mode mode)
{
if (mode != m_mode) {
+ // Reset scrollbars before changing the view mode.
+ m_container->horizontalScrollBar()->setValue(0);
+ m_container->verticalScrollBar()->setValue(0);
+
ViewProperties props(viewPropertiesUrl());
props.setViewMode(mode);