diff --git a/help/Writerside/hi.tree b/help/Writerside/hi.tree
index 51d3e97..fe5e267 100644
--- a/help/Writerside/hi.tree
+++ b/help/Writerside/hi.tree
@@ -15,6 +15,10 @@
+
+
+
+
diff --git a/help/Writerside/topics/函数替换.md b/help/Writerside/topics/函数替换.md
new file mode 100644
index 0000000..a94e7d1
--- /dev/null
+++ b/help/Writerside/topics/函数替换.md
@@ -0,0 +1,3 @@
+# 函数替换
+
+Start typing here...
\ No newline at end of file
diff --git a/help/Writerside/topics/数据映射.md b/help/Writerside/topics/数据映射.md
new file mode 100644
index 0000000..4f56468
--- /dev/null
+++ b/help/Writerside/topics/数据映射.md
@@ -0,0 +1,6 @@
+# 数据映射
+
+## 快速跳转
+[表替换](http://10.20.163.105:6045/uft3changecode/表替换.html)
+
+[函数替换](http://10.20.163.105:6045/uft3changecode/函数替换.html)
\ No newline at end of file
diff --git a/help/Writerside/topics/表替换.md b/help/Writerside/topics/表替换.md
new file mode 100644
index 0000000..5467fa6
--- /dev/null
+++ b/help/Writerside/topics/表替换.md
@@ -0,0 +1,3 @@
+# 表替换
+
+Start typing here...
\ No newline at end of file
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index 29c6e44..ff0c0b2 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -5,6 +5,7 @@
#include "ElaToolButton.h"
#include "utils/uf2configreader.h"
#include "utils/uft3configreader.h"
+#include "utils/configmanager.h"
#include "utils/logmanager.h"
#include "utils/Constants.h"
#include "utils/versionchecker.h"
@@ -76,7 +77,10 @@ MainWindow::MainWindow(QWidget *parent)
void MainWindow::loadConfigCache()
{
LogManager::instance()->log("正在加载配置缓存...");
-
+
+ // 1. 加载 config.ini 到内存缓存(ConfigManager::loadConfig 之前从未被调用过)
+ ConfigManager::instance()->loadConfig(QCoreApplication::applicationDirPath());
+
UF2ConfigReader uf2Reader;
bool uf2Loaded = uf2Reader.loadAllUF20Config();
diff --git a/src/metadataupdate/metadataprocessor.cpp b/src/metadataupdate/metadataprocessor.cpp
index 1d44b56..003e6fb 100644
--- a/src/metadataupdate/metadataprocessor.cpp
+++ b/src/metadataupdate/metadataprocessor.cpp
@@ -48,6 +48,26 @@ void MetadataProcessor::initConfig(const QString& basePath)
LogManager::instance()->log(QString("UFT30路径: %1").arg(m_uft30Path));
}
+void MetadataProcessor::reloadPaths()
+{
+ LogManager::instance()->log("========== 重新加载配置路径 ==========");
+
+ ConfigManager* configManager = ConfigManager::instance();
+
+ m_uf20Path = configManager->getValue("projectPath", "uf20");
+ m_ufAcct20Path = configManager->getValue("projectPath", "ufAcct20");
+ m_uftDbSettPath = configManager->getValue("projectPath", "UftdbSett");
+ m_uft30PubPath = configManager->getValue("projectPath", "uft30pub");
+ m_uft30CbptransPath = configManager->getValue("projectPath", "uft30cbptrans");
+ m_uft30Path = configManager->getValue("projectPath", "uft30");
+
+ m_supportUftdbSett = configManager->getValue("testConfig", "supportUftdbSett");
+ m_moduleGenerationCheck = configManager->getValue("testConfig", "moduleGenerationCheck");
+
+ LogManager::instance()->log(QString("UF20路径: %1").arg(m_uf20Path));
+ LogManager::instance()->log(QString("UFT30路径: %1").arg(m_uft30Path));
+}
+
bool MetadataProcessor::isValidUtf8(const QByteArray& data)
diff --git a/src/metadataupdate/metadataprocessor.h b/src/metadataupdate/metadataprocessor.h
index 3bacca7..affacd5 100644
--- a/src/metadataupdate/metadataprocessor.h
+++ b/src/metadataupdate/metadataprocessor.h
@@ -31,6 +31,7 @@ public:
public:
void initConfig(const QString& basePath);
+ void reloadPaths(); // 从 ConfigManager 刷新缓存的路径
private:
bool isValidUtf8(const QByteArray& data);
diff --git a/src/pages/batchconvert/batchconvertpage.cpp b/src/pages/batchconvert/batchconvertpage.cpp
index d8c2277..8a2a142 100644
--- a/src/pages/batchconvert/batchconvertpage.cpp
+++ b/src/pages/batchconvert/batchconvertpage.cpp
@@ -20,6 +20,7 @@
#include
#include
#include
+#include
#include "src/utils/logmanager.h"
#include "ElaPushButton.h"
#include "ElaProgressBar.h"
@@ -225,6 +226,14 @@ void BatchConvertPage::resizeEvent(QResizeEvent *event)
}
}
+void BatchConvertPage::showEvent(QShowEvent *event)
+{
+ QWidget::showEvent(event);
+ // 每次显示页面时刷新"是否存在"列
+ // (元数据更新后 DataCache 变化,需要重新检查函数存在状态)
+ updateTable();
+}
+
void BatchConvertPage::onEditRow(int row)
{
if (row < 0 || row >= m_funcList.size()) {
diff --git a/src/pages/batchconvert/batchconvertpage.h b/src/pages/batchconvert/batchconvertpage.h
index 87e10bf..35012b0 100644
--- a/src/pages/batchconvert/batchconvertpage.h
+++ b/src/pages/batchconvert/batchconvertpage.h
@@ -50,6 +50,7 @@ private:
bool checkFunctionExists(const QString &funcName);
void updateTable();
void resizeEvent(QResizeEvent *event) override;
+ void showEvent(QShowEvent *event) override;
QString getConfigFilePath() const;
void setupConfigWatcher();
QDateTime currentFileMtime() const;
diff --git a/src/pages/metadatupdate/metadatupdatepage.cpp b/src/pages/metadatupdate/metadatupdatepage.cpp
index 584c890..515d72c 100644
--- a/src/pages/metadatupdate/metadatupdatepage.cpp
+++ b/src/pages/metadatupdate/metadatupdatepage.cpp
@@ -128,6 +128,13 @@ void MetadataUpdatePage::initUI()
void MetadataUpdatePage::showEvent(QShowEvent* event)
{
ElaScrollPage::showEvent(event);
+
+ // 每次显示页面时重新从 ConfigManager 读取路径
+ // (用户可能已在设置页面修改过路径)
+ if (_processor) {
+ _processor->reloadPaths();
+ }
+
static bool firstShow = true;
if (firstShow)
{
diff --git a/src/utils/Constants.h b/src/utils/Constants.h
index 660dc6e..6dc8cec 100644
--- a/src/utils/Constants.h
+++ b/src/utils/Constants.h
@@ -14,7 +14,7 @@ namespace Constants {
// 应用版本号(发版时只需修改此处)
// ---------------------------------------------------------------------------
namespace App {
- constexpr char Version[] = "1.2.0";
+ constexpr char Version[] = "1.3.0";
}
// ---------------------------------------------------------------------------
diff --git a/update_info.json b/update_info.json
index f2e7001..20bf812 100644
--- a/update_info.json
+++ b/update_info.json
@@ -7,5 +7,8 @@
},
"V1.2.0": {
"release_notes": "1.新增数据映射页面,表映射、函数映射;\n2.新增版本更新提示功能;"
- }
+ },
+ "V1.3.0": {
+ "release_notes": "1.修复设置路径不生效;\n2.修复元数据更新后业务转码模块对函数检查状态异常问题;"
+ }
}