选择曲线名改变后,显示名称也更新

This commit is contained in:
jiayulong 2026-05-19 15:29:45 +08:00
parent 2d9954ecf4
commit 57823699a3

View File

@ -704,7 +704,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
//
m_formInfo->m_strLineName = strLineName;
//m_formInfo->m_strSlfName = sFilePath;
//m_formInfo->m_strSlfName = sFilePath;
m_formInfo->update();
//改变固井曲线名
@ -1880,6 +1880,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
m_bSelfChange=true;
QtVariantProperty *tempProperty = (QtVariantProperty*)it.key();
tempProperty->setValue("");
break;
}
}
//通知界面缩放
@ -2045,6 +2046,22 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
//
m_formInfo->m_strLineName = strLineName;
//m_formInfo->m_strSlfName = sFilePath;
//显示名称,替换曲线名
if(m_formInfo->m_strAliasName.contains(strOldLineName))
{
m_formInfo->m_strAliasName.replace(strOldLineName, strLineName);
//
for (auto it = m_propertyData.constBegin(); it != m_propertyData.constEnd(); ++it)
{
if(it.value()=="显示名称")
{
m_bSelfChange=true;
QtVariantProperty *tempProperty = (QtVariantProperty*)it.key();
tempProperty->setValue(m_formInfo->m_strAliasName);
break;
}
}
}
m_formInfo->update();
//改变曲线名