From d664c5a1c6e5e56be6ed60bdf4ee484c42185915 Mon Sep 17 00:00:00 2001 From: chendapao Date: Wed, 11 Jan 2023 18:32:21 +0800 Subject: [PATCH] feature/adj_history_open_use_conf (#2330) --- src/widgets/historypanel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/widgets/historypanel.cpp b/src/widgets/historypanel.cpp index e301bce4..78cc6320 100644 --- a/src/widgets/historypanel.cpp +++ b/src/widgets/historypanel.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -118,8 +119,11 @@ void HistoryPanel::openItem(const QListWidgetItem *p_item) if (!isValidItem(p_item)) { return; } + const auto &coreConfig = ConfigMgr::getInst().getCoreConfig(); + auto paras = QSharedPointer::create(); + paras->m_mode = coreConfig.getDefaultOpenMode(); - emit VNoteX::getInst().openFileRequested(getPath(p_item), QSharedPointer::create()); + emit VNoteX::getInst().openFileRequested(getPath(p_item), paras); } void HistoryPanel::clearHistory()