View Issue Details

IDProjectCategoryView StatusLast Update
0035255LazarusIDEpublic2020-04-05 13:46
Reporterptvs Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformIntel Core i3-7100OSMicrosoft Windows 7 SP1 x86 
Product Version2.1 (SVN) 
Summary0035255: Form Designer: moving multiple controls with keyboard affects their dimensions.
DescriptionWhen you move selected controls on the form designer, and then unselect some of them so that selection shrinks, and move the selection with keyboard, then selected controls's width and height will shrink proportionally every time you press the Ctrl+Arrows.
This not happens if you add some controls back after you unselected them.
Steps To Reproduce1. Select three or more controls on the form.
2. Move selected controls with keys or mouse.
3. Unselect any control at the edge of overall selection box so that it shrinks.
4. Move selected controls with Ctrl+Arrows.
TagsNo tags attached.
Fixed in Revisionr62881
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

ptvs

2019-03-21 09:59

reporter  

2019-03-21_130142.png (22,658 bytes)   
2019-03-21_130142.png (22,658 bytes)   

ptvs

2019-03-21 09:59

reporter  

2019-03-21_130204.png (22,652 bytes)   
2019-03-21_130204.png (22,652 bytes)   

ptvs

2019-10-17 13:24

reporter   ~0118641

I did not get what is wrong with selection bounds calculation, but this workaround solves the issue.
bug_0035255.patch (399 bytes)   
Index: designer/designer.pp
===================================================================
--- designer/designer.pp	(revision 62067)
+++ designer/designer.pp	(working copy)
@@ -862,6 +862,7 @@
   {$ENDIF}
   if (Selection.SelectionForm<>Form)
   or Selection.LookupRootSelected then exit;
+  Selection.SaveBounds(false);
   Selection.MoveSelection(DiffX, DiffY, False);
   Modified;
 end;
bug_0035255.patch (399 bytes)   

ptvs

2020-04-04 10:25

reporter   ~0121889

Please, review the patch.

Juha Manninen

2020-04-04 12:59

developer   ~0121891

This was on my ToDo list. Sorry for the delay.
I fixed it in the correct place, TControlSelection.Delete, in r62881.
Please test. If it works it can still be merged for Lazarus 2.0.8.

ptvs

2020-04-05 12:01

reporter   ~0121932

I tested your patch on the "fixes_2_0" branch under Windows 7 x86 and it works fine.

Juha Manninen

2020-04-05 13:46

developer   ~0121940

Thanks. It will be merged for Lazarus 2.0.8.

Issue History

Date Modified Username Field Change
2019-03-21 09:59 ptvs New Issue
2019-03-21 09:59 ptvs File Added: 2019-03-21_130142.png
2019-03-21 09:59 ptvs File Added: 2019-03-21_130204.png
2019-10-17 13:24 ptvs File Added: bug_0035255.patch
2019-10-17 13:24 ptvs Note Added: 0118641
2020-04-04 10:25 ptvs Note Added: 0121889
2020-04-04 12:59 Juha Manninen Assigned To => Juha Manninen
2020-04-04 12:59 Juha Manninen Status new => feedback
2020-04-04 12:59 Juha Manninen LazTarget => -
2020-04-04 12:59 Juha Manninen Note Added: 0121891
2020-04-05 12:01 ptvs Note Added: 0121932
2020-04-05 12:01 ptvs Status feedback => assigned
2020-04-05 13:46 Juha Manninen Status assigned => resolved
2020-04-05 13:46 Juha Manninen Resolution open => fixed
2020-04-05 13:46 Juha Manninen Fixed in Revision => r62881
2020-04-05 13:46 Juha Manninen Widgetset Win32/Win64 => Win32/Win64
2020-04-05 13:46 Juha Manninen Note Added: 0121940