mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
don't trip onInspectorFieldModified unless the value actually changed
This commit is contained in:
parent
88e9de47d7
commit
5b2274d203
1 changed files with 4 additions and 2 deletions
|
|
@ -468,7 +468,8 @@ void GuiInspectorField::setWordData(const S32& wordIndex, const char* data, bool
|
||||||
|
|
||||||
// Fire callback single-object undo.
|
// Fire callback single-object undo.
|
||||||
|
|
||||||
if (callbacks && !mField->flag.test(AbstractClassRep::FieldFlags::FIELD_ComponentInspectors))
|
if (callbacks && !mField->flag.test(AbstractClassRep::FieldFlags::FIELD_ComponentInspectors)
|
||||||
|
&& (dStrcmp(fieldData, newFieldData.end().c_str()) != 0))
|
||||||
Con::executef(mInspector, "onInspectorFieldModified",
|
Con::executef(mInspector, "onInspectorFieldModified",
|
||||||
target->getIdString(),
|
target->getIdString(),
|
||||||
mField->pFieldname,
|
mField->pFieldname,
|
||||||
|
|
@ -603,7 +604,8 @@ void GuiInspectorField::setData( const char* data, bool callbacks )
|
||||||
|
|
||||||
// Fire callback single-object undo.
|
// Fire callback single-object undo.
|
||||||
|
|
||||||
if( callbacks && !mField->flag.test(AbstractClassRep::FieldFlags::FIELD_ComponentInspectors) )
|
if( callbacks && !mField->flag.test(AbstractClassRep::FieldFlags::FIELD_ComponentInspectors)
|
||||||
|
&& (dStrcmp(oldValue.c_str(), newValue.c_str()) != 0))
|
||||||
Con::executef( mInspector, "onInspectorFieldModified",
|
Con::executef( mInspector, "onInspectorFieldModified",
|
||||||
target->getIdString(),
|
target->getIdString(),
|
||||||
mField->pFieldname,
|
mField->pFieldname,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue