Bug 98130 - after upgrade from LO 4.4.7.2 to 5.0.5.2, clicking on checkboxes in a Base grid table form is inconsistent
Summary: after upgrade from LO 4.4.7.2 to 5.0.5.2, clicking on checkboxes in a Base gr...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.0.5.2 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.4.0 target:6.3.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: RenderContext
  Show dependency treegraph
 
Reported: 2016-02-24 09:49 UTC by Jean-Paul
Modified: 2019-09-02 07:09 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
simple table and form to easily reproduce the problem (13.79 KB, application/vnd.sun.xml.base)
2016-02-24 09:49 UTC, Jean-Paul
Details
sample database to reproduce the problem (10.97 KB, application/vnd.sun.xml.base)
2016-02-24 10:43 UTC, Jean-Paul
Details
testcase to reproduce the problem (10.91 KB, application/vnd.sun.xml.base)
2018-06-05 14:05 UTC, Jean-Paul
Details
example after migration in Libo 6.1 (19.96 KB, application/vnd.oasis.opendocument.database)
2018-06-05 14:49 UTC, Drew Jensen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Paul 2016-02-24 09:49:27 UTC
Created attachment 122937 [details]
simple table and form to easily reproduce the problem

I have a table with multiple boolean columns.
I have a form on this table, showing the grid of checkboxes.

In LO 4.4.7.2, when I click on any checkbox in any column, its row is selected, and its value is swapped (from checked to unchecked or reverse). 

In LO 5.0.5.2, the first time I click any checkbox in a column, its row is selected (green arrow), but its value is not swapped anymore. I have to click a second time to have the checkbox swapped. The following times I click any checkbox in the same column, its value is swapped immediately. If I click a checkbox in another column (for the first time), its value is not swapped.

In attachment, a simple table and form to easily reproduce the problem.

In reality, I am using a much more complex table and grid, where the problem is so annoying that I have to downgrade back to 4.4.7.2.

The problem also happens in 5.1.0.3.
Comment 1 Jean-Paul 2016-02-24 10:43:54 UTC
Created attachment 122939 [details]
sample database to reproduce the problem
Comment 2 Robert Großkopf 2016-02-26 17:54:26 UTC
Have tested with LO 5.1.1.1 on OpenSUE 42.1 64bit rpm Linux. Same problem: Click on a checkbox doesn't change the state if the row isn't chosen before.
Works well in LO 4.4.7.2, so a regression.
Comment 3 raal 2016-03-09 16:52:09 UTC
This seems to have begun at the below commit.
Adding Cc: to Tomaž Vajngerl ; Could you possibly take a look at this one?
Thanks
 7ebf9d47e5dc52f4d9ece1049f818735ed43fb6e is the first bad commit
commit 7ebf9d47e5dc52f4d9ece1049f818735ed43fb6e
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Wed May 27 22:12:11 2015 +0800

    source-hash-53ef550ac6fc3505914c3d77e9d0575913e54bb3
    
    commit 53ef550ac6fc3505914c3d77e9d0575913e54bb3
    Author:     Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
    AuthorDate: Tue Apr 28 17:43:26 2015 +0900
    Commit:     Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
    CommitDate: Wed Apr 29 09:27:54 2015 +0900
    
        vcl button: Delegate RenderContext to sub-methods, use Invalidate
    
        Change-Id: Idd4181180da0bbbac872b58569e30cbc384125fe
Comment 4 Jean-Paul 2016-07-11 05:49:57 UTC
The problem still happens in 5.1.3.2.
Comment 5 Jean-Paul 2016-08-07 06:40:05 UTC
The problem still happens in 5.2.0.4.
Comment 6 Jean-Paul 2017-05-27 07:10:21 UTC
The problem still happens in 5.3.2.2.
Comment 7 Jean-Paul 2018-06-05 14:05:37 UTC
Created attachment 142541 [details]
testcase to reproduce the problem
Comment 8 Drew Jensen 2018-06-05 14:49:07 UTC
Created attachment 142542 [details]
example after migration in Libo 6.1

Here is the example odb from the fist attachment with 2 changes
migrated to firebird engine
added 1 varchar and 1 char field to table
added form with grid control 'Table_checkboxes'

So this new behavior is identical in both attached files (hsql and firebird) and this change (from 4.x [change data] to 5.x [select data] behavior) only happens the first time a checkbox is clicked in a respective row or column of the result set, subsequent clicks on a check box behaves as in earlier releases (a change in the data)


To see that do the following:

1 Open either of the attached files
2 Open the form (either form in the second file)

IF you are using the second attachment (firebird) all the values in last two records are null. For the first attachment make it so and close the form saving the data, then reopen it.

3 click one time only in the cell reference ID = 5, field = 'checkbox3'
4 click one time only in the cell reference ID = 6, field = 'checkbox1'

From now on clicking on any checkbox in columns 'checkbox1', checkbox3' or rows with ID value 5,6 will change the data with a single click.

5 click one time only in the cell reference ID = 5, field = 'checkbox1'
data changed

6 click one time only in the cell reference ID = 2, field = 'checkbox2'
data selected not changed

7 if you have the form Table_checkboxes open click on either of the character field with data to see that the data is always selected and if that is in a row not touched before makes all the checkbox fields in that row now respond with data change on single click.
Comment 9 QA Administrators 2019-06-06 02:53:43 UTC Comment hidden (obsolete)
Comment 10 Alex Thurgood 2019-06-06 08:50:38 UTC
Testing the original hsqldb embedded ODB file on master macOS leads to a horrendous repeatable crash, either when first opening the form, or when attempting to click on any of the boolean tick boxes in the grid. Seems to be some sort of instability caused by the grid of checkboxes, possibly new bug report.

When I do finally get to load the form and test it without crashing, I can still reproduce the behaviour.

Version: 6.3.0.0.alpha0+
Build ID: dfae42730911256dceb8369528ee9d9944a0fa3e
CPU threads: 8; OS: Mac OS X 10.14.5; UI render: GL; VCL: osx; 
Locale: fr-FR (fr_FR.UTF-8); UI-Language: en-US
Calc: threaded
Comment 11 Commit Notification 2019-08-23 17:02:49 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/306180ac17ad6f3edfe403fb5b79232717f8e75f%5E%21

tdf#98130 vcl CheckBox: fix incorrect ignored mouse event

It will be available in 6.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Xisco Faulí 2019-09-02 07:07:02 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: 41cd3e8e817c8c33a13608e62eeb06ce2c6977e4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Miklos, thanks for fixing this issue!
Comment 13 Commit Notification 2019-09-02 07:09:04 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/6c6f459f32144d06385bd542944f24afef0240eb%5E%21

tdf#98130 vcl CheckBox: fix incorrect ignored mouse event

It will be available in 6.3.2.

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

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