summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls
diff options
context:
space:
mode:
authorPrashant Pandey <prashant3.yishu@gmail.com>2013-09-13 01:27:39 +0530
committerCaolán McNamara <caolanm@redhat.com>2013-09-30 19:54:01 +0000
commit9379a922c07df3cdb7d567cc88dfaaa39ead3681 (patch)
tree63860ecc914cd63c673d31f751f52c66f2d004a2 /svx/source/tbxctrls
parent8965bfda9753568a038303d9935f7a451282a857 (diff)
Sidebar: Show default line-color in 'Draw'
Currently, the default color shown in Sidebar>Line>Color is yellow and is not updated until and unless one hovers a mouse on top of it. This is wrong and the default color of the line-color should be updated and shown by default. Change-Id: I213cba84a0fc726220acfe547955a96d6bb4446b Reviewed-on: https://gerrit.libreoffice.org/5932 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r--svx/source/tbxctrls/tbxcolorupdate.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index b3e4fc7c0618..53376bf1d692 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -92,7 +92,11 @@ namespace svx
if( aColor.GetColor() == COL_AUTO )
aColor = Color( COL_TRANSPARENT );
- if( ( maCurColor != aColor ) || bSizeChanged || bDisplayModeChanged )
+ // For a shape selected in 'Draw', when color selected in Sidebar > Line > Color
+ // is COL_BLACK, then (maCurColor != aColor) becomes 'false', therefore we take
+ // explicit care of COL_BLACK from the last argument in the condition so that the
+ // Update() does its routine job appropriately !
+ if( ( maCurColor != aColor ) || bSizeChanged || bDisplayModeChanged || ( aColor == COL_BLACK ) )
{
// create an empty bitmap, and copy the original bitmap inside
// (so that it grows in case the original bitmap was smaller)