|
|
|
@ -1364,9 +1364,7 @@ void nmPlotGraphicBinder::removeWellBinding(nmObjPointWell* pGraphic)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 兜底同步:由井图元在 paintBack 中调用
|
|
|
|
// 兜底同步:由井图元在 paintBack 中调用
|
|
|
|
// 注意:不同步名称。图元 getName() 返回自动生成的对象名,用它会覆盖数据中心井名,
|
|
|
|
// 同步图元名称、外观属性到数据中心,用于持久化保存。
|
|
|
|
// 导致重新加载时名称匹配失败。井名通过 afterCreated() 正确设置。
|
|
|
|
|
|
|
|
// 位置/半径等同步已在 paintBack() 主体中完成。此处仅同步图元外观属性用于持久化。
|
|
|
|
|
|
|
|
void nmPlotGraphicBinder::syncWellData(nmObjPointWell* pGraphic)
|
|
|
|
void nmPlotGraphicBinder::syncWellData(nmObjPointWell* pGraphic)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!pGraphic) return;
|
|
|
|
if (!pGraphic) return;
|
|
|
|
@ -1374,6 +1372,19 @@ void nmPlotGraphicBinder::syncWellData(nmObjPointWell* pGraphic)
|
|
|
|
nmDataWellBase* pData = m_mapWellData.value(pGraphic, nullptr);
|
|
|
|
nmDataWellBase* pData = m_mapWellData.value(pGraphic, nullptr);
|
|
|
|
if (!pData) return;
|
|
|
|
if (!pData) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 同步名称(用户在属性面板改名后,同步到数据中心和框架数据)
|
|
|
|
|
|
|
|
QString sName = pGraphic->getName();
|
|
|
|
|
|
|
|
if (!sName.isEmpty()) {
|
|
|
|
|
|
|
|
if (pData->getWellName() != sName) {
|
|
|
|
|
|
|
|
pData->setWellName(sName);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ZxDataWell* pWellData = pGraphic->getWellData();
|
|
|
|
|
|
|
|
if (pWellData && pWellData->getName() != sName) {
|
|
|
|
|
|
|
|
pWellData->setName(sName);
|
|
|
|
|
|
|
|
pWellData->save();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 同步图元外观属性到井数据(用于保存到 JSON)
|
|
|
|
// 同步图元外观属性到井数据(用于保存到 JSON)
|
|
|
|
ZxDot dot = pGraphic->getDot();
|
|
|
|
ZxDot dot = pGraphic->getDot();
|
|
|
|
pData->setDotStyle(static_cast<int>(dot.style()));
|
|
|
|
pData->setDotStyle(static_cast<int>(dot.style()));
|
|
|
|
|