Bug 100370 - Status bar functions - Selection Icon not working properly on left mouse click
Summary: Status bar functions - Selection Icon not working properly on left mouse click
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium trivial
Assignee: Kshitij
URL:
Whiteboard: target:6.1.0
Keywords: difficultyInteresting, easyHack, regression, skillCpp, topicUI
: 86570 88065 (view as bug list)
Depends on:
Blocks: Statusbar
  Show dependency treegraph
 
Reported: 2016-06-14 13:01 UTC by Marco Filippozzi
Modified: 2018-10-05 13:23 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Filippozzi 2016-06-14 13:01:13 UTC
Description:
When you click with the left mouse button on the selection icon in the status bar in Writer, the selection switches to the next selection method and opens the dropdown menu, while clicking with the right mouse button only opens the dropdown menu.

Steps:
Open LibreOffice Writer.
Click on the selection Icon with the right mouse button.
Click on the Selection Icon in the Status Bar with the left mouse button.
Click again with the right mouse button and notice how the selection goes onto the next selection method.

Current Behaviour:
Clicking with the left mouse button opens the dropdown menù and switches the selection method while clicking with the right mouse button only opens the dropdown menù.

Expected behaviour:
Clicking with the left mouse button only switches the selection method while clicking with the right mouse button only shows the dropdown menù.

Comment:
This might be considered a bug since when you click with the right mouse button the selection doesn't change and the dropdown menu opens, but when you click with the left mouse button the selection changes and the dropdown menu still opens.

Present on:
Version: 5.1.3.2
Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b
CPU Threads: 2; OS Version: Linux 4.1; UI Render: default; 
Locale: it-IT (it_IT.UTF-8)
OS: openSUSE Leap 42.1 (x86_64)

Version: 5.0.6.3
Build ID: 490fc03b25318460cfc54456516ea2519c11d1aa
Locale: it-IT (it_IT.UTF-8)
OS: openSUSE Leap 42.1 (x86_64)

Version: 4.4.0.1
Build ID: 1ba9640ddd424f1f535c75bf2b86703770b8cf6f
Locale: it_IT
OS: openSUSE Leap 42.1 (x86_64)

Version: 4.4.7.2
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: it_IT.UTF-8
OS: openSUSE Leap 42.1 (x86_64)
Comment 1 manuel.defranceschi 2016-06-14 13:06:19 UTC
Not present on:
Version: 4.3.7.2
Build ID: 8a35821d8636a03b8bf4e15b48f59794652c68ba
OS: openSUSE Leap 42.1 (x86_64)
Comment 2 V Stuart Foote 2016-06-14 14:43:36 UTC
Confirming, but several of the Satus bar buttons have functions that differ depending on a Left Mouse or a Right Mouse selection.

Zoom level, or Page style for example.
The Left mouse opens a dialog, the right mouse a pick list.

On the Selection button -- right mouse opens the pick list.  Left mouse opens the list and advances the selection type.

Originally, when Kendy changed the mode selection to a menu with
https://cgit.freedesktop.org/libreoffice/core/commit/?id=f76fde91c4103812d924b973cec83a7b316a1f05 --both the Left and Right mouse actions had the pick list menu.

I looked, but couldn't find where the behavior was changed. But don't know that is necessarily wrong--but could be unintended of other changes.

@Kendy?


=-ref-=
http://opengrok.libreoffice.org/xref/core/svx/source/stbctrls/selctrl.cxx
http://opengrok.libreoffice.org/xref/core/svx/source/stbctrls/stbctrls.h
http://opengrok.libreoffice.org/xref/core/svx/source/stbctrls/stbctrls.src
Comment 3 Jan Holesovsky 2016-06-15 12:12:42 UTC
If we want to limit the menu only to the right click, I think the right thing to do is to check rEvt in:

  bool SvxSelectionModeControl::MouseButtonDown( const MouseEvent& rEvt )

in file

  https://cgit.freedesktop.org/libreoffice/core/tree/svx/source/stbctrls/selctrl.cxx

that it is the right button that triggered the action, and if it is, show the menu.
Comment 4 massimo.zaffaina 2016-06-17 10:31:14 UTC
*** Bug 88065 has been marked as a duplicate of this bug. ***
Comment 5 Marco Filippozzi 2016-06-24 07:32:02 UTC
assigned to myself, will try to fix the easyhack
Comment 6 jani 2016-06-24 07:41:45 UTC
(In reply to Marco Filippozzi from comment #5)
> assigned to myself, will try to fix the easyhack

Welcome, looking forward to see your patch. We have created a step by step guide to help you:
https://wiki.documentfoundation.org/Development/GetInvolved

have fun
jan i
Comment 7 jani 2016-07-25 05:22:35 UTC
a polite ping, still working on this issue ?
Comment 8 Yousuf Philips (jay) (retired) 2016-07-31 12:30:15 UTC
*** Bug 86570 has been marked as a duplicate of this bug. ***
Comment 9 Yousuf Philips (jay) (retired) 2016-07-31 12:32:25 UTC
Samuel's fix in bug 82707 broke this functionality.
Comment 10 Samuel Mehrbrodt (CIB) 2016-09-08 08:08:24 UTC
This seems about right in current master. However, it's broken in 5.1.
Didn't test 5.2.
Comment 11 jani 2016-11-08 10:53:37 UTC
A polite ping, still working on solving this bug ?
Comment 12 jani 2016-12-21 08:58:05 UTC
According to comment 10, this bug seems solved.
Comment 13 Yousuf Philips (jay) (retired) 2016-12-21 10:07:13 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #10)
> This seems about right in current master. However, it's broken in 5.1.
> Didn't test 5.2.

Not sure which master you tested, but it is still broken.

Version: 5.3.0.0.beta1+
Build ID: a1f6159db30e2463b118c1571bb01a09356b7c49
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; VCL: gtk2; Layout Engine: new; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:libreoffice-5-3, Time: 2016-12-08_00:34:06
Locale: en-US (en_US.UTF-8); Calc: group
Comment 14 jani 2017-01-23 08:20:07 UTC
A polite ping still working on this issue ?
Comment 15 Fakabbir amin 2017-02-02 14:42:24 UTC
Also bug found in,
Version: 5.2.5.1
Build ID: 5.2.5-1
CPU Threads: 4; OS Version: Linux 4.9; UI Render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group.
Comment 16 riesslibo 2017-05-07 12:53:09 UTC
Still confirming in 

Version: 5.4.0.0.alpha1+
Build-ID: 2b1737f648024328390bf44c4f2c614e748a92fd
CPU-Threads: 2; Betriebssystem:Windows 6.1; UI-Render: Standard; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-05-07_02:29:33
Gebietsschema: de-DE (de_DE); Calc: group

Left click turns automatically the selection of the style one down and show the list after changing the selection style.
Comment 17 jani 2017-05-14 07:42:52 UTC Comment hidden (obsolete)
Comment 18 Xisco Faulí 2017-06-14 02:22:42 UTC Comment hidden (obsolete)
Comment 19 Xisco Faulí 2017-07-15 02:31:23 UTC Comment hidden (obsolete)
Comment 20 Xisco Faulí 2017-08-15 02:23:50 UTC Comment hidden (obsolete)
Comment 21 Xisco Faulí 2017-09-15 15:27:37 UTC Comment hidden (obsolete)
Comment 22 Xisco Faulí 2017-09-16 02:04:48 UTC Comment hidden (obsolete)
Comment 23 Xisco Faulí 2017-09-17 02:04:53 UTC Comment hidden (obsolete)
Comment 24 Kshitij 2018-01-21 18:34:44 UTC
Hi! I would like to work on this bug.
Comment 25 Kshitij 2018-01-21 21:39:40 UTC
I have submitted the patch can someone review that https://gerrit.libreoffice.org/#/c/48279/
Comment 26 Commit Notification 2018-01-22 09:54:48 UTC
Kshitij Pathania committed a patch related to this issue.
It has been pushed to "master":

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

tdf#100370 Selection icon now working properly on mouse click

It will be available in 6.1.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 27 Harald Koester 2018-10-05 11:27:53 UTC
Checked with version 6.1.2 (64 bit, Win 10).

Works as expected according original description of this bug. Hence bug closed.
Thanks for fixing.

Comment: 
It's still not transparent which selection is currently used. You have to move the mouse pointer above the icon in order to get a tip with the current mode. I would expect different icons as described in bug 88477.