Update Form Designer - application/formdesigner/mainwindow/formdesignermodel.ring - when we change the control name, update the name in layouts.
@@ -406,11 +406,23 @@ Class FormDesignerModel
return
}
}
+ # Set the new name
for Item in aObjectsList {
if PtrCmp( Item[2].pObject , oObject.pObject ) {
+ cOldName = Item[1]
Item[1] = cValue
}
}
+ # Update Control Name in Layouts
+ for Item in aObjectsList {
+ if ClassName(Item[2]) = "formdesigner_qlayout" {
+ cLayoutObjects = Item[2].layoutobjectsValue()
+ cLayoutObjects = substr(cLayoutObjects,cOldName,cValue)
+ Item[2].setlayoutobjectsValue(cLayoutObjects)
+ }
+ }
+
+
func GetObjectClassByName cName
cOutput = ""
