View Issue Details

IDProjectCategoryView StatusLast Update
0032196LazarusIDEpublic2018-04-04 19:41
Reportera.ramos Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformAMD64OSLinux 
Product Version1.9 (SVN) 
Summary0032196: BorderSpacing changes byt itself when multi-selecting components
DescriptionWhen selecting some components with different anchorsidetop while anchoring window is visible, BorderSpacing is set to 0
Detected only in Linux with GTK2. Windows version works ok
Steps To Reproduce-Create new application
-Put two tedits in form1
-Edit1 with anchorsidetop to Form1 (asrTop, spacing 10)
-Edit2 with anchorsidetop to Edit2 (asrBottom, spacing 5)
-Make visible anchoring window
-Select both Edit1 and Edit2
-Previous values of spacing dissapear
TagsNo tags attached.
Fixed in Revisionr55789, r57581
LazTarget-
WidgetsetGTK 2
Attached Files

Relationships

related to 0024371 resolvedJuha Manninen Wrong usage of SelStart and SelLength in OnChange event only the first time 
related to 0032985 closedJuha Manninen [patch] Fix TFloatSpinEdit behaviour (Gtk2) 
related to 0031618 closedJuha Manninen TSpinEdit.OnChange events in GTk2 
related to 0033426 resolvedJuha Manninen Property top/left/width/height is 'locked' when it is selected in Object Inspector 

Activities

Michl

2017-07-28 21:28

developer   ~0101980

Last edited: 2017-07-28 21:30

View 2 revisions

I've tested 64bit Linux Mint KDE 17.3 with your version Lazarus 1.9.0 r55553 FPC 3.0.2 x86_64-linux-gtk2 and 64bit Windows 7 with Lazarus 1.9.0 r55597 FPC 3.0.4 i386-win32-win32/win64.

Both shows the same behaviour:

If I select one TEdit, the borderspacing of this is shown.

If I select both TEdits no borderspacing (value 0) is shown, when spacing of Edit1 is 10 and Edit2 is 5.

If I select both TEdits borderspacing 5 is shown, when spacing of Edit1 is 5 and Edit2 is 5. No matter which sibling is taken.

I can't see any issues here.

Can you explain more, what is working on Windows and what is not working on GTK2?!

a.ramos

2017-09-01 14:06

reporter  

step1.png (51,279 bytes)   
step1.png (51,279 bytes)   

a.ramos

2017-09-01 14:07

reporter  

step2.png (53,834 bytes)   
step2.png (53,834 bytes)   

a.ramos

2017-09-01 14:07

reporter  

step3.png (55,856 bytes)   
step3.png (55,856 bytes)   

a.ramos

2017-09-01 14:11

reporter   ~0102562

As you can see at attached images, values (borderspacing) change by themselves when selecting both components, loosing their previous values

Juha Manninen

2017-09-01 16:37

developer   ~0102567

Last edited: 2017-09-01 16:38

View 2 revisions

@a.ramos, no, the image only shows that value 0 is shown when they are both selected.
Obviously the correct values cannot be shown because they differ.
Are you saying the original value is lost when you again select a single control?

a.ramos

2017-09-04 09:27

reporter   ~0102627

Yes, original value is lost. Please see Form1 at third image: the tedits have moved

Juha Manninen

2017-09-04 11:57

developer   ~0102629

Damn, I am able to reproduce when using FPC trunk.
@a.ramos, did you also build Lazarus with FPC trunk?
How can the compiler make such a difference? I don't know.

a.ramos

2017-09-04 12:22

reporter   ~0102630

This is the FPC I'm using, Lazarus was built with it:
Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for x86_64
Same version at Linux and Windows environments

Should I try with another FPC version?

Michl

2017-09-05 23:00

developer   ~0102654

I tested five different GTK2-OSes, at least 64bit Ubuntu 16.04.3 with FPC trunk and Lazarus trunk, but I don't get it. So I've to detach me from this issue.

> How can the compiler make such a difference?
Maybe not a compiler issue, maybe a not setted result or something?!

Juha Manninen

2017-09-06 12:46

developer   ~0102659

Last edited: 2017-09-06 12:46

View 2 revisions

Ok, I was the guilty one. It was not caused by a compiler version.
Partly reverting r53653 and checking for gtk_minor_version again helps.
Please test with r55789.

My Manjaro Linux has new versions of everything. It used to work but not any more. Now the gtk_minor_version is 24 here.
@Michl, what is the value in your system.
You can add:
 DebugLn(['_gtkchanged_editbox_: gtk_minor_version=', gtk_minor_version]);
before the "if gtk_minor_version < 17 then" line in gtk2callback.inc, or find it out otherwise.

Michl

2017-09-06 15:38

developer   ~0102665

Last edited: 2017-09-06 15:40

View 2 revisions

My tested systems has GTK2 version 24 (tested with: pkg-config --modversion gtk+-2.0):

OpenSUSE Leap 42.2 Lazarus 1.9.0 r55644 FPC 3.0.2 x86_64-linux-gtk2 GTK2: 2.24.31
Linux Mint 17.3 KDE Lazarus 1.9.0 r55760 FPC 3.0.2 x86_64-linux-gtk2 GTK2: 2.24.23
Linux Mint 18.1 Cinnamon Lazarus 1.9.0 r55599 FPC 3.0.2 x86_64-linux-gtk2 GTK2: 2.24.30
Ubuntu 16.04.3 Desktop Lazarus 1.9.0 r55788 FPC 3.1.1 x86_64-linux-gtk2 GTK2: 2.24.30

Juha Manninen

2017-09-06 15:48

developer   ~0102666

Ok, the same value. Anyway if it works for a.ramos then the commit will be backported to 1.8.

a.ramos

2017-09-06 15:55

reporter   ~0102667

Tested with r55789, and it works ok. Thanks

Juha Manninen

2017-09-06 18:13

developer   ~0102672

Thanks. Resolving.

a.ramos

2017-11-14 16:31

reporter   ~0104102

Same problem again at r56406

Juha Manninen

2017-11-24 21:23

developer   ~0104242

Uhhh... this is another case with GTK2 where you must choose between 2 bugs.
If somebody knows how to solve this without breaking something else, please tell me.
I hope we get rid of GTK2 soon.

accorp

2018-04-04 03:36

reporter   ~0107570

Fixed in r57581.

Juha Manninen

2018-04-04 10:34

developer   ~0107578

Great! Resolving.

a.ramos

2018-04-04 19:41

reporter   ~0107610

Tested ok at r57601

Issue History

Date Modified Username Field Change
2017-07-24 14:54 a.ramos New Issue
2017-07-28 21:28 Michl LazTarget => -
2017-07-28 21:28 Michl Note Added: 0101980
2017-07-28 21:28 Michl Assigned To => Michl
2017-07-28 21:28 Michl Status new => feedback
2017-07-28 21:30 Michl Note Edited: 0101980 View Revisions
2017-09-01 14:06 a.ramos File Added: step1.png
2017-09-01 14:07 a.ramos File Added: step2.png
2017-09-01 14:07 a.ramos File Added: step3.png
2017-09-01 14:11 a.ramos Note Added: 0102562
2017-09-01 14:11 a.ramos Status feedback => assigned
2017-09-01 16:37 Juha Manninen Note Added: 0102567
2017-09-01 16:38 Juha Manninen Note Edited: 0102567 View Revisions
2017-09-04 09:27 a.ramos Note Added: 0102627
2017-09-04 11:57 Juha Manninen Note Added: 0102629
2017-09-04 12:22 a.ramos Note Added: 0102630
2017-09-05 23:00 Michl Note Added: 0102654
2017-09-05 23:01 Michl Assigned To Michl =>
2017-09-05 23:01 Michl Status assigned => new
2017-09-06 12:33 Juha Manninen Assigned To => Juha Manninen
2017-09-06 12:33 Juha Manninen Status new => assigned
2017-09-06 12:46 Juha Manninen Note Added: 0102659
2017-09-06 12:46 Juha Manninen Status assigned => feedback
2017-09-06 12:46 Juha Manninen Note Edited: 0102659 View Revisions
2017-09-06 15:38 Michl Note Added: 0102665
2017-09-06 15:40 Michl Note Edited: 0102665 View Revisions
2017-09-06 15:48 Juha Manninen Note Added: 0102666
2017-09-06 15:55 a.ramos Note Added: 0102667
2017-09-06 15:55 a.ramos Status feedback => assigned
2017-09-06 18:13 Juha Manninen Fixed in Revision => r55789
2017-09-06 18:13 Juha Manninen Note Added: 0102672
2017-09-06 18:13 Juha Manninen Status assigned => resolved
2017-09-06 18:13 Juha Manninen Resolution open => fixed
2017-09-06 21:27 a.ramos Status resolved => closed
2017-11-14 16:31 a.ramos Note Added: 0104102
2017-11-14 16:31 a.ramos Status closed => assigned
2017-11-14 16:31 a.ramos Resolution fixed => reopened
2017-11-24 21:13 Juha Manninen Relationship added related to 0024371
2017-11-24 21:19 Juha Manninen Relationship added related to 0032630
2017-11-24 21:20 Juha Manninen Relationship deleted related to 0032630
2017-11-24 21:23 Juha Manninen Note Added: 0104242
2018-01-04 18:30 Juha Manninen Relationship added related to 0031618
2018-03-14 08:32 Juha Manninen Relationship added related to 0033426
2018-04-04 03:36 accorp Note Added: 0107570
2018-04-04 10:33 Juha Manninen Relationship added related to 0032985
2018-04-04 10:34 Juha Manninen Fixed in Revision r55789 => r55789, r57581
2018-04-04 10:34 Juha Manninen Note Added: 0107578
2018-04-04 10:34 Juha Manninen Status assigned => resolved
2018-04-04 10:34 Juha Manninen Resolution reopened => fixed
2018-04-04 19:41 a.ramos Note Added: 0107610
2018-04-04 19:41 a.ramos Status resolved => closed