mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
bug-fix: locating to current file should not always change to two panels view
This commit is contained in:
parent
787c61a5af
commit
ce2a572211
@ -301,9 +301,7 @@ void VMainWindow::initViewToolBar(QSize p_iconSize)
|
||||
break;
|
||||
|
||||
case (int)PanelViewState::CompactMode:
|
||||
m_panelViewState = PanelViewState::CompactMode;
|
||||
g_config->setEnableCompactMode(true);
|
||||
changePanelView(m_panelViewState);
|
||||
compactModeView();
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1807,6 +1805,13 @@ void VMainWindow::twoPanelView()
|
||||
changePanelView(m_panelViewState);
|
||||
}
|
||||
|
||||
void VMainWindow::compactModeView()
|
||||
{
|
||||
m_panelViewState = PanelViewState::CompactMode;
|
||||
g_config->setEnableCompactMode(true);
|
||||
changePanelView(m_panelViewState);
|
||||
}
|
||||
|
||||
void VMainWindow::toggleOnePanelView()
|
||||
{
|
||||
if (m_panelViewState == PanelViewState::TwoPanels) {
|
||||
@ -2139,7 +2144,11 @@ bool VMainWindow::locateFile(VFile *p_file)
|
||||
}
|
||||
|
||||
// Open the directory and file panels after location.
|
||||
if (m_panelViewState == PanelViewState::CompactMode) {
|
||||
compactModeView();
|
||||
} else {
|
||||
twoPanelView();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -119,6 +119,7 @@ private slots:
|
||||
void changeHighlightTrailingSapce(bool p_checked);
|
||||
void onePanelView();
|
||||
void twoPanelView();
|
||||
void compactModeView();
|
||||
void curEditFileInfo();
|
||||
void deleteCurNote();
|
||||
void handleCurrentDirectoryChanged(const VDirectory *p_dir);
|
||||
@ -268,6 +269,7 @@ private:
|
||||
VVimIndicator *m_vimIndicator;
|
||||
VTabIndicator *m_tabIndicator;
|
||||
|
||||
// SinglePanel, TwoPanels, CompactMode.
|
||||
PanelViewState m_panelViewState;
|
||||
|
||||
// Actions
|
||||
|
Loading…
x
Reference in New Issue
Block a user