mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
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
This commit is contained in:
parent
385146a1e8
commit
0e4d428e84
|
@ -279,6 +279,10 @@ bool DolphinView::isActive() const
|
||||||
void DolphinView::setViewMode(Mode mode)
|
void DolphinView::setViewMode(Mode mode)
|
||||||
{
|
{
|
||||||
if (mode != m_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());
|
ViewProperties props(viewPropertiesUrl());
|
||||||
props.setViewMode(mode);
|
props.setViewMode(mode);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue