|
|
|
@ -1874,8 +1874,25 @@ void nmSubWndMain::onShowSensitiveResults()
|
|
|
|
iSubWndFitting* fitting = m_pResultRefreshFitting.data();
|
|
|
|
iSubWndFitting* fitting = m_pResultRefreshFitting.data();
|
|
|
|
if(!manager || !fitting || !manager->getSensitiveData()) return;
|
|
|
|
if(!manager || !fitting || !manager->getSensitiveData()) return;
|
|
|
|
QSharedPointer<nmDataSensitive::BatchResult> result = manager->getSensitiveData()->getResults();
|
|
|
|
QSharedPointer<nmDataSensitive::BatchResult> result = manager->getSensitiveData()->getResults();
|
|
|
|
if(result.isNull()) return;
|
|
|
|
|
|
|
|
iGuiPlot* plot = fitting->getPlotByTag(s_Tag_ChartSensitivity);
|
|
|
|
iGuiPlot* plot = fitting->getPlotByTag(s_Tag_ChartSensitivity);
|
|
|
|
|
|
|
|
if(result.isNull()) {
|
|
|
|
|
|
|
|
// 新模型已丢弃旧批次,同时清除图元与撤销记录,避免窗口恢复或保存后残留旧曲线。
|
|
|
|
|
|
|
|
if(plot) {
|
|
|
|
|
|
|
|
for(int i = plot->m_pPlot->getObjCount() - 1; i >= 0; --i) {
|
|
|
|
|
|
|
|
if(qobject_cast<ZxObjCurve*>(plot->m_pPlot->getObjByIndex(i)))
|
|
|
|
|
|
|
|
plot->m_pPlot->removeObjByIndex(i);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
plot->clearUndoStack();
|
|
|
|
|
|
|
|
plot->runUpdate();
|
|
|
|
|
|
|
|
QMdiSubWindow* subWindow = nullptr;
|
|
|
|
|
|
|
|
for(QWidget* parent = plot->parentWidget(); parent && !subWindow; parent = parent->parentWidget())
|
|
|
|
|
|
|
|
subWindow = qobject_cast<QMdiSubWindow*>(parent);
|
|
|
|
|
|
|
|
if(subWindow) subWindow->close();
|
|
|
|
|
|
|
|
else plot->hide();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(sender() == manager) fitting->setModified(true);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
const bool created = plot == nullptr;
|
|
|
|
const bool created = plot == nullptr;
|
|
|
|
// 通用取窗接口未实现敏感性类型,直接复用框架已有的内部 MDI 创建函数。
|
|
|
|
// 通用取窗接口未实现敏感性类型,直接复用框架已有的内部 MDI 创建函数。
|
|
|
|
if(created) plot = fitting->initSensitivityPlot();
|
|
|
|
if(created) plot = fitting->initSensitivityPlot();
|
|
|
|
|