Bug 68874 - Highlighter icon doesn't change color if no text is selected
Summary: Highlighter icon doesn't change color if no text is selected
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: Other All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:4.2.0 target:4.1.3 target:4.0.6
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-03 07:13 UTC by Wilson Wang
Modified: 2013-09-17 15:39 UTC (History)
2 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 Wilson Wang 2013-09-03 07:13:04 UTC
When I chose different color for highlighter, the color below the hightlighter icon doesn't change according to the color that I chose.
Comment 1 a79833 2013-09-03 20:43:15 UTC
This happens only when no text is selected on my machine (kubuntu 13.04, same LO).
Comment 2 tommy27 2013-09-05 23:05:21 UTC
tested under Win7 64bit

highlighter icon color immediately updates choosing any color when text is selected

if no text is selected it updates only if you select some colors (i.e. "pink2" sometimes you have to select it twice) while it never updates with others (i.e. "black")

still affects 4.2 alpha (Sept 3 build) and is already reproducible in multiple previous versions (at least up to 3.6.7) while it works normally in 3.5.7 and earlier releases... so it's a 3-5 --> 3.6 regression.

edited summary notes, changing version to 3.6.7,
setting status to NEW, adding regression keyword,
lowering importance to "minor" and  adding UI expert to CC list
Comment 3 Ivan Timofeev (retired) 2013-09-08 17:27:26 UTC
The following change fixes the problem for me:

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 9c6b63e..2a254065 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2537,7 +2537,7 @@ void SvxColorExtToolBoxControl::StateChanged(
 
 {
     const SvxColorItem* pItem = 0;
-    if ( bChoiceFromPalette )
+    if ( bChoiceFromPalette && nSID == GetSlotId() )
     {
         bChoiceFromPalette = sal_False;
         switch( nSID )

but I'd like to know why StateChanged is called with nSID != GetSlotId()... :-| Let me debug it a bit.
Comment 4 Commit Notification 2013-09-14 16:10:48 UTC
Ivan Timofeev committed a patch related to this issue.
It has been pushed to "master":

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

fdo#68874: Highlighter icon doesn't change color if no text is selected



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 5 Ivan Timofeev (retired) 2013-09-14 16:13:44 UTC
(In reply to comment #3)
> The following change fixes the problem for me:
[...]
> but I'd like to know why StateChanged is called with nSID != GetSlotId()...
> :-| Let me debug it a bit.

Sigh, didn't manage to find resources for that, pushed the change to master, proposed to 4-1 and 4-0.
Comment 6 Commit Notification 2013-09-16 08:03:36 UTC
Ivan Timofeev committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=053e4635d816cb18a6098a58f6d275417a244ac0&h=libreoffice-4-1

fdo#68874: Highlighter icon doesn't change color if no text is selected


It will be available in LibreOffice 4.1.3.

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 7 Commit Notification 2013-09-17 12:37:00 UTC
Ivan Timofeev committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=95dfcdcf7710a2b384d3ef8a94443efee86eb701&h=libreoffice-4-0

fdo#68874: Highlighter icon doesn't change color if no text is selected


It will be available in LibreOffice 4.0.6.

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.