Update Form Designer - Cancel Many-Selection when selecting one object only.
@@ -103,6 +103,7 @@ Class FormDesignerController from WindowsControllerParent
func SelectDrawAction aRect
if oView.oToolBtn1.ischecked() { # Select
+ oModel.ClearSelectedObjects()
SelectObjects(aRect)
elseif oView.oToolBtn2.ischecked() # Create Label
HideCorners()
@@ -140,6 +141,7 @@ Class FormDesignerController from WindowsControllerParent
nY2 = nY + oObject.Height()
if Intersection(nX,nY,nX2,nY2,nSX,nSY,nSX2,nSY2) {
oObject.oCorners.Show()
+ oModel.AddSelectedObject(x)
}
}
@@ -158,6 +160,15 @@ Class FormDesignerController from WindowsControllerParent
}
return False
+ func CancelSelectedObjects
+ aObjects = oModel.getselectedObjects()
+ if len(aObjects) = 0 { return }
+ for item in aObjects {
+ oObject = item[2]
+ oObject.oCorners.Hide()
+ }
+ oModel.clearSelectedObjects()
+
func ChangeObjectAction
if oView.oObjectsCombo.count() = 0 { return }
HideCorners()
@@ -176,6 +187,7 @@ Class FormDesignerController from WindowsControllerParent
ShowCorners()
func HideCorners
+ CancelSelectedObjects()
if isattribute(oModel.activeObject(),"oCorners") {
oModel.activeObject().oCorners.Hide()
}
@@ -580,6 +592,7 @@ Class FormDesignerModel
nActiveObject = 0
nLabelsCount = 0
nIDCounter = 0
+ aManySelectedObjects = []
func AddObject cName,oObject
nIDCounter++
@@ -618,6 +631,15 @@ Class FormDesignerModel
del(aObjectsList,nActiveObject)
nActiveObject = 1
+ func ClearSelectedObjects
+ aManySelectedObjects = []
+
+ func AddSelectedObject nIndex
+ aManySelectedObjects + aObjectsList[nIndex]
+
+ func GetSelectedObjects
+ return aManySelectedObjects
+
Class FormDesignerGeneral
func oCursorA
