Update Form Designer - Support using Modifiers (Control, Shift) keys to Add/Remove objects from selected group of objects.
@@ -420,10 +420,25 @@ Class FormDesignerController from WindowsControllerParent
func ActiveObjectMousePress nObjectID
nObjectIndex = oModel.IDToIndex(nObjectID)
if oView.oToolBtn1.ischecked() { # Select Mode
- if oModel.IsManySelected() and oModel.IsObjectSelected(nObjectID) {
+ if oModel.IsManySelected() {
+ if oModel.IsObjectSelected(nObjectID) {
+ if oFDApp.keyboardmodifiers() {
+ oModel.RemoveSelectedObject(nObjectIndex)
+ oModel.GetObjectByIndex(nObjectIndex).oCorners.Hide()
+ return
+ else
oModel.GetObjectByIndex(nObjectIndex).MousePressMany(self)
return
}
+ else
+ if oFDApp.keyboardmodifiers() {
+ oModel.AddSelectedObject(nObjectIndex)
+ oModel.GetObjectByIndex(nObjectIndex).MousePressMany(self)
+ oModel.GetObjectByIndex(nObjectIndex).oCorners.Show()
+ return
+ }
+ }
+ }
ChangeObjectByCode(nObjectIndex-1)
if classname(oModel.ActiveObject()) != "formdesigner_qwidget" {
oModel.ActiveObject().MousePress(self)
@@ -1426,6 +1441,12 @@ Class FormDesignerModel
}
return False
+ func RemoveSelectedObject nObjectID
+ nPos = find(aManySelectedObjects,nObjectID,3)
+ if nPos {
+ del(aManySelectedObjects,nPos)
+ }
+
func AddPushButton oObject
nPushButtonsCount++
AddObject("Button"+nPushButtonsCount,oObject)
