mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59: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->setToolsDockChecked(toolDock->isVisible());
|
||||
|
||||
// In one panel view, it will save the wrong state that the directory tree
|
||||
// panel has a width of zero.
|
||||
changePanelView(PanelViewState::TwoPanels);
|
||||
g_config->setMainSplitterState(m_mainSplitter->saveState());
|
||||
|
||||
changePanelView(PanelViewState::CompactMode);
|
||||
g_config->setNaviSplitterState(m_naviSplitter->saveState());
|
||||
if (m_panelViewState == PanelViewState::CompactMode) {
|
||||
g_config->setNaviSplitterState(m_naviSplitter->saveState());
|
||||
} else {
|
||||
// In one panel view, it will save the wrong state that the directory tree
|
||||
// panel has a width of zero.
|
||||
changePanelView(PanelViewState::TwoPanels);
|
||||
g_config->setMainSplitterState(m_mainSplitter->saveState());
|
||||
}
|
||||
}
|
||||
|
||||
void VMainWindow::restoreStateAndGeometry()
|
||||
|
Loading…
x
Reference in New Issue
Block a user