Bug 102957 - UI: consecutive showing of changed dialog from Basic application, make that all get as minimal size the size that was set for the first dialog
Summary: UI: consecutive showing of changed dialog from Basic application, make that a...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.3.0 target:5.2.4
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2016-10-04 13:42 UTC by Cor Nouws
Modified: 2018-02-22 20:10 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
screen shot of the dialog with little explanation (53.24 KB, image/png)
2016-10-04 13:42 UTC, Cor Nouws
Details
zip with extension, readme, and folder with files to run the extension (869.17 KB, application/x-zip)
2016-11-08 16:06 UTC, Cor Nouws
Details
ini file that demonstrates the problem more obvious (2.70 KB, text/plain)
2016-11-09 10:33 UTC, Cor Nouws
Details
ini file demonstrating (more or less) how it should work (2.67 KB, text/plain)
2016-11-09 10:45 UTC, Cor Nouws
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2016-10-04 13:42:37 UTC
Created attachment 127808 [details]
screen shot of the dialog with little explanation

I have an extension that shows a dialog, that is changed (content and size) depending on the selected item in a list box in that dialog.
Now since some time, the size of the dialog as shown, has minimal height/width that is set for the first time that the dialog is shown.
Thus leaving ugly white space.
Comment 1 Cor Nouws 2016-10-04 13:45:30 UTC
$ git bisect good cf4c569f675fc0256806cc50293c7de8d6060770 is the first bad commit
commit cf4c569f675fc0256806cc50293c7de8d6060770
Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Sun Dec 6 05:36:28 2015 +0100

    2015-12-06: source-hash-30d73431ee51ca2ebcca9029bf0af4a0c4dc565c

:100644 100644 515137db133fa3ce6d9cd29b388225bd90a1e663 07a2e489fda76147df570fd50bcdf7cd6fd14b7a M	build-info.txt
:040000 040000 46ab3bed6abc3ba07825832f9dcdff9f9dc07032 c446b71c1b84df47a25fbeef910d9a8b9e70b3a6 M	opt

https://cgit.freedesktop.org/libreoffice/core/commit/?id=30d73431ee51ca2ebcca9029bf0af4a0c4dc565c


$ git bisect log
# bad: [d3acb9dfa21e2597d0affe3f04fe18b2022b9026] 2016-05-26: source-hash-a042951ad4db2b84021e1d43361511dec998ce82
# good: [69eedb44a433e3be69137a83238a4184785c752f] 2015-11-25: source-hash-7289a140fc68dc898ba2b2357cc960968195f236
git bisect start 'latest' 'oldest'
# bad: [7d1c6fda154836547542c6d741f34a158dd1102c] 2016-02-24: source-hash-f84b8c03462238b821724b7f504ad141c83fcf8f
git bisect bad 7d1c6fda154836547542c6d741f34a158dd1102c
# bad: [6dd89e633720c3f49a4f6eae79311db185759525] 2016-01-09: source-hash-85ac3cd63f6720ff2d3c4b7491f4ad296219fa53
git bisect bad 6dd89e633720c3f49a4f6eae79311db185759525
# bad: [4106e1e219154f968de1ba085fa836ee35fb1aa1] 2015-12-17: source-hash-15614c847dde4c52a4974022e5523c9c4fea856b
git bisect bad 4106e1e219154f968de1ba085fa836ee35fb1aa1
# bad: [cf4c569f675fc0256806cc50293c7de8d6060770] 2015-12-06: source-hash-30d73431ee51ca2ebcca9029bf0af4a0c4dc565c
git bisect bad cf4c569f675fc0256806cc50293c7de8d6060770
# good: [b2831cde62bf14f8c71ca478a4a0b9d92d537e3d] 2015-11-30: source-hash-4ee9cfecf1800394881f5015199cd6e4af14bc92
git bisect good b2831cde62bf14f8c71ca478a4a0b9d92d537e3d
# good: [4fabeefdb8a91a3a7ccf48d605558d0007447713] 2015-12-03: source-hash-103cd686de34b668a838c459f3d827c02e704656
git bisect good 4fabeefdb8a91a3a7ccf48d605558d0007447713
# good: [8f87124263c2773edb093e17a3ca9755439903e3] 2015-12-05: source-hash-8ac2b6d077f4e7b1c5a010c2960fb08c0132da5f
git bisect good 8f87124263c2773edb093e17a3ca9755439903e3
# first bad commit: [cf4c569f675fc0256806cc50293c7de8d6060770] 2015-12-06: source-hash-30d73431ee51ca2ebcca9029bf0af4a0c4dc565c
Comment 2 Cor Nouws 2016-10-04 13:48:15 UTC
@caolán:
Looking at https://cgit.freedesktop.org/libreoffice/core/log/?ofs=12600

I consider your following commits relevant candidates cd58b8a69ee9c5d5be90852e09f1ca5b5971d54b 8f77810a9cb44fb252a591939f74a5404b41be87 8b361da6b729b25ed8293f26132ae99350f7f472 77f2fed86d512d8e1942a75b91cd13ce1945c149

Could you please have a look?
Would it be helpful to have the extension (need to prepare a test version any way for a crasher that happens in master when it is installed ;p )
Comment 3 Caolán McNamara 2016-10-04 19:34:11 UTC
yeah, please provide a reproducer for it and I'll have a look
Comment 4 Cor Nouws 2016-11-08 16:06:25 UTC
Created attachment 128579 [details]
zip with extension, readme, and folder with files to run the extension

(In reply to Caolán McNamara from comment #3)
> yeah, please provide a reproducer for it and I'll have a look

Hi Caolán,

See the attachment.
I was not able to reproduce the error with a simple show/shrink dialog action, therefore a full package :)

A bit background information:
The issue is triggered by the actions in the procedure Dialog.Sub lstDocSoorten_Change ().

- That procedure builds the dialog that shows the user the documents and 'fields'. That is done with information from a ini file. (ln 868-1018)
- But also: if the dialog exists, the user may chose a different document-type from the list lstDocSoorten. Then the controls added dynamicaly for the previously selected document-type, are disposed first. (ln 684-721)
- After the controls for the new document-type are added, the dimensions and tab order for the dialog are set (ln 1032-1071).
( In between a lot of other stuff is done )

I checked to ensure that the erroneous effect (the dialog does not shrink under the size of the first version displayed), is not related to the lists showing languages or locations for the first document type.
Comment 5 Cor Nouws 2016-11-09 10:33:19 UTC
Created attachment 128611 [details]
ini file that demonstrates the problem more obvious

the attached ini file shows more obvious what the problem is.
copy to neohs/ini/
Comment 6 Cor Nouws 2016-11-09 10:45:16 UTC
Created attachment 128612 [details]
ini file demonstrating (more or less) how it should work

Attached neohsdoc_smallstart.ini demonstrates (more or less) how it should work. It is only with the last document (Notes) that you see that the dialog doesn't get a size smaller (lower) then when it started.

(In reply to Cor Nouws from comment #5)
> the attached ini file shows more obvious what the problem is.
> copy to neohs/ini/

And - sorry - how to reproduce:

menu LibreLex > New Document
(selected is Letter)
move arrow down to select other documents and see the dialog change.
Comment 7 Cor Nouws 2016-11-09 11:52:10 UTC
(In reply to Cor Nouws from comment #6)
> Attached neohsdoc_smallstart.ini demonstrates (more or less) how it should

has to be renamed too neohsdoc.ini
Comment 8 Caolán McNamara 2016-11-15 10:45:34 UTC
I install the extension and run LibreLex > New Document and I get...

"Error in installation:
the file 'settings.ini(file with installation-information)' is not found op location
file:///home/caolan/Documents/neohs/settings.ini
Contact the application manager."

I copy either of the two .ini files you attached in comment #5 or comment #6 to /home/caolan/Documents/neohs/settings.ini and I get...

"Error in SetGlobalVars ( i = 0 ). :"
Comment 9 Caolán McNamara 2016-11-15 13:03:15 UTC
I believe the problem is actually...

commit afeddaf7e0d11ad9b1df0c80bcc3f50caa87e21a
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Wed Dec 16 10:46:10 2015 +0000

    Related: rhbz#1281906 set a min size on un-resizeable non-layout dialogs
Comment 10 Commit Notification 2016-11-15 13:24:53 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1aeff41c4a6b16a2ec69faf4a0bee301bd609101

Resolves: tdf#102957 revert SetMinOutputSizePixel workaround

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Caolán McNamara 2016-11-15 13:27:19 UTC
see https://gerrit.libreoffice.org/#/c/30871/ for 5-2 backport
Comment 12 Commit Notification 2016-11-15 15:09:45 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7e2ef433d29fca84ed27a9203b5761dc8dbd8bf8

Resolves: tdf#102957 revert SetMinOutputSizePixel workaround

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Cor Nouws 2016-11-16 08:04:44 UTC
(In reply to Caolán McNamara from comment #9)
> I believe the problem is actually...

Was the one that first came to my mind too.
And yes, it's ok now.

thanks!
Comment 14 Commit Notification 2016-11-23 11:37:57 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=37ded4ac7b1fe91bb08eaada29d3514570432073&h=libreoffice-5-2

Resolves: tdf#102957 revert SetMinOutputSizePixel workaround

It will be available in 5.2.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.