mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00
bug-fix: do not save state of main splitter in compact mode
This commit is contained in:
parent
8e48b43cda
commit
f428ba19f7
@ -2147,13 +2147,14 @@ void VMainWindow::saveStateAndGeometry()
|
|||||||
g_config->setMainWindowState(saveState());
|
g_config->setMainWindowState(saveState());
|
||||||
g_config->setToolsDockChecked(toolDock->isVisible());
|
g_config->setToolsDockChecked(toolDock->isVisible());
|
||||||
|
|
||||||
// In one panel view, it will save the wrong state that the directory tree
|
if (m_panelViewState == PanelViewState::CompactMode) {
|
||||||
// panel has a width of zero.
|
g_config->setNaviSplitterState(m_naviSplitter->saveState());
|
||||||
changePanelView(PanelViewState::TwoPanels);
|
} else {
|
||||||
g_config->setMainSplitterState(m_mainSplitter->saveState());
|
// In one panel view, it will save the wrong state that the directory tree
|
||||||
|
// panel has a width of zero.
|
||||||
changePanelView(PanelViewState::CompactMode);
|
changePanelView(PanelViewState::TwoPanels);
|
||||||
g_config->setNaviSplitterState(m_naviSplitter->saveState());
|
g_config->setMainSplitterState(m_mainSplitter->saveState());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void VMainWindow::restoreStateAndGeometry()
|
void VMainWindow::restoreStateAndGeometry()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user