fix(controller): 无条件清异常缓存(跨空间) + 移动语义 + 信号参数正名
This commit is contained in:
parent
8cab498f81
commit
6cf53ab199
|
|
@ -50,6 +50,7 @@ void WorkbenchNavController::loadProjectsAndStructure() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lastProjects_ = ps.value.rows;
|
lastProjects_ = ps.value.rows;
|
||||||
|
tmExceptionCache_.clear();
|
||||||
QString curP;
|
QString curP;
|
||||||
if (!ps.value.rows.empty()) {
|
if (!ps.value.rows.empty()) {
|
||||||
const auto& first = ps.value.rows.front();
|
const auto& first = ps.value.rows.front();
|
||||||
|
|
@ -66,7 +67,6 @@ void WorkbenchNavController::loadProjectsAndStructure() {
|
||||||
|
|
||||||
if (curP.isEmpty()) {
|
if (curP.isEmpty()) {
|
||||||
lastStructNodes_.clear();
|
lastStructNodes_.clear();
|
||||||
tmExceptionCache_.clear();
|
|
||||||
emit structureLoaded(QString(), {}); // 暂无项目 → 空树
|
emit structureLoaded(QString(), {}); // 暂无项目 → 空树
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -186,12 +186,12 @@ void WorkbenchNavController::setCheckedTms(const QStringList& tmObjectIds) {
|
||||||
}
|
}
|
||||||
it = tmExceptionCache_.emplace(tm, ex.value).first;
|
it = tmExceptionCache_.emplace(tm, ex.value).first;
|
||||||
}
|
}
|
||||||
const auto grouped = data::dto::groupExceptionsByConsortium(it->second);
|
auto grouped = data::dto::groupExceptionsByConsortium(it->second);
|
||||||
data::ObjectExceptionGroup g;
|
data::ObjectExceptionGroup g;
|
||||||
g.objectId = tm;
|
g.objectId = tm;
|
||||||
g.objectName = nameOf(tm);
|
g.objectName = nameOf(tm);
|
||||||
g.consortia = grouped.consortia;
|
g.consortia = std::move(grouped.consortia);
|
||||||
g.looseExceptions = grouped.loose;
|
g.looseExceptions = std::move(grouped.loose);
|
||||||
total += static_cast<int>(it->second.size());
|
total += static_cast<int>(it->second.size());
|
||||||
groups.push_back(std::move(g));
|
groups.push_back(std::move(g));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ signals:
|
||||||
void filesLoaded(const QString& tmObjectId, const std::vector<geopro::data::DsRow>& rows,
|
void filesLoaded(const QString& tmObjectId, const std::vector<geopro::data::DsRow>& rows,
|
||||||
int total, bool append);
|
int total, bool append);
|
||||||
void objectDetailLoaded(const QString& title, const geopro::data::DynamicForm& form);
|
void objectDetailLoaded(const QString& title, const geopro::data::DynamicForm& form);
|
||||||
void exceptionTreeLoaded(const std::vector<geopro::data::ObjectExceptionGroup>& groups, int tmCount);
|
void exceptionTreeLoaded(const std::vector<geopro::data::ObjectExceptionGroup>& groups, int exceptionCount);
|
||||||
void datasetDetailLoaded(const geopro::data::DynamicForm& form);
|
void datasetDetailLoaded(const geopro::data::DynamicForm& form);
|
||||||
void loadFailed(const QString& stage, const QString& message);
|
void loadFailed(const QString& stage, const QString& message);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue