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;
|
break;
|
||||||
|
|
||||||
case (int)PanelViewState::CompactMode:
|
case (int)PanelViewState::CompactMode:
|
||||||
m_panelViewState = PanelViewState::CompactMode;
|
compactModeView();
|
||||||
g_config->setEnableCompactMode(true);
|
|
||||||
changePanelView(m_panelViewState);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -1807,6 +1805,13 @@ void VMainWindow::twoPanelView()
|
|||||||
changePanelView(m_panelViewState);
|
changePanelView(m_panelViewState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VMainWindow::compactModeView()
|
||||||
|
{
|
||||||
|
m_panelViewState = PanelViewState::CompactMode;
|
||||||
|
g_config->setEnableCompactMode(true);
|
||||||
|
changePanelView(m_panelViewState);
|
||||||
|
}
|
||||||
|
|
||||||
void VMainWindow::toggleOnePanelView()
|
void VMainWindow::toggleOnePanelView()
|
||||||
{
|
{
|
||||||
if (m_panelViewState == PanelViewState::TwoPanels) {
|
if (m_panelViewState == PanelViewState::TwoPanels) {
|
||||||
@ -2139,7 +2144,11 @@ bool VMainWindow::locateFile(VFile *p_file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Open the directory and file panels after location.
|
// Open the directory and file panels after location.
|
||||||
|
if (m_panelViewState == PanelViewState::CompactMode) {
|
||||||
|
compactModeView();
|
||||||
|
} else {
|
||||||
twoPanelView();
|
twoPanelView();
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -119,6 +119,7 @@ private slots:
|
|||||||
void changeHighlightTrailingSapce(bool p_checked);
|
void changeHighlightTrailingSapce(bool p_checked);
|
||||||
void onePanelView();
|
void onePanelView();
|
||||||
void twoPanelView();
|
void twoPanelView();
|
||||||
|
void compactModeView();
|
||||||
void curEditFileInfo();
|
void curEditFileInfo();
|
||||||
void deleteCurNote();
|
void deleteCurNote();
|
||||||
void handleCurrentDirectoryChanged(const VDirectory *p_dir);
|
void handleCurrentDirectoryChanged(const VDirectory *p_dir);
|
||||||
@ -268,6 +269,7 @@ private:
|
|||||||
VVimIndicator *m_vimIndicator;
|
VVimIndicator *m_vimIndicator;
|
||||||
VTabIndicator *m_tabIndicator;
|
VTabIndicator *m_tabIndicator;
|
||||||
|
|
||||||
|
// SinglePanel, TwoPanels, CompactMode.
|
||||||
PanelViewState m_panelViewState;
|
PanelViewState m_panelViewState;
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user