The below patch "fixes" half of the issue.
BUt it is wrong in a few ways.
- It does not solve the fact that moving in one direction is locked.
- the enable/disable calls are implemented in a bad way. Works now, but invite errors in future. IF they are to be used (not sure, there may be a better solution without them / there probably is) then they should allow multiply nested invocations, by using a counter instead
Anyway this is probably the wrong fix, but I do not know the designer at all....
A more correct solution would probably be, to prevent the prop editor from writing the value to the control at all, since the value came from the control.
Index: designer/controlselection.pp
===================================================================
--- designer/controlselection.pp (revision 41361)
+++ designer/controlselection.pp (working copy)
@@ -413,6 +413,8 @@
procedure SaveBounds;
procedure UpdateBounds;
procedure RestoreBounds;
+ procedure DisableSaveBounds;
+ procedure EnableSaveBounds;
function MoveSelection(dx, dy: integer; TotalDeltas: Boolean): Boolean;
function MoveSelectionWithSnapping(TotalDx, TotalDy: integer): Boolean;
@@ -1124,6 +1126,16 @@
EndUpdate;
end;
+procedure TControlSelection.DisableSaveBounds;
+begin
+ Include(FStates,cssDoNotSaveBounds);
+end;
+
+procedure TControlSelection.EnableSaveBounds;
+begin
+ Exclude(FStates,cssDoNotSaveBounds);
+end;
+
procedure TControlSelection.AdjustGrabbers;
var g:TGrabIndex;
OutPix, InPix, NewGrabberLeft, NewGrabberTop: integer;
Index: designer/designer.pp
===================================================================
--- designer/designer.pp (revision 41361)
+++ designer/designer.pp (working copy)
@@ -2276,6 +2276,7 @@
Include(FFlags, dfHasSized);
end;
//debugln('TDesigner.MouseMoveOnControl Move MouseDownComponent=',dbgsName(MouseDownComponent),' OldMouseMovePos=',dbgs(OldMouseMovePos),' MouseMovePos',dbgs(LastMouseMovePos),' MouseDownPos=',dbgs(MouseDownPos));
+ ControlSelection.DisableSaveBounds;
if (ssAlt in Shift) then begin
if ControlSelection.MoveSelection(LastMouseMovePos.X - MouseDownPos.X, LastMouseMovePos.Y - MouseDownPos.Y, True) then
DoModified;
@@ -2283,6 +2284,7 @@
if ControlSelection.MoveSelectionWithSnapping(LastMouseMovePos.X - MouseDownPos.X, LastMouseMovePos.Y - MouseDownPos.Y) then
DoModified;
end;
+ ControlSelection.EnableSaveBounds;
end
else
begin