[Libreoffice-commits] core.git: cui/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Sep 10 11:36:36 UTC 2018
cui/source/tabpages/tphatch.cxx | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
New commits:
commit c8c4f35ae3e9721aecba0987359f5e106a9041eb
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 9 21:27:12 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 10 13:36:16 2018 +0200
select an entry before setting sensitivity
Change-Id: Ifeafd4dedc77e5361a1ef6744a68f601ffd713bc
Reviewed-on: https://gerrit.libreoffice.org/60227
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index aa7e81177265..162c0134d750 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -184,18 +184,19 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
XFillBackgroundItem aBckItem( rSet.Get(XATTR_FILLBACKGROUND));
m_rXFSet.Put( aBckItem );
- if(aBckItem.GetValue())
+ if (aBckItem.GetValue())
{
m_xCbBackgroundColor->set_state(TRISTATE_TRUE);
XFillColorItem aColorItem( rSet.Get(XATTR_FILLCOLOR) );
Color aColor(aColorItem.GetColorValue());
- m_xLbBackgroundColor->set_sensitive(true);
m_xLbBackgroundColor->SelectEntry(aColor);
+ m_xLbBackgroundColor->set_sensitive(true);
m_rXFSet.Put( aColorItem );
}
else
{
m_xCbBackgroundColor->set_state(TRISTATE_FALSE);
+ m_xLbBackgroundColor->SelectEntry(COL_AUTO);
m_xLbBackgroundColor->set_sensitive(false);
}
@@ -262,6 +263,10 @@ void SvxHatchTabPage::Reset( const SfxItemSet* rSet )
{
ChangeHatchHdl_Impl();
+ XFillColorItem aColItem( rSet->Get(XATTR_FILLCOLOR) );
+ m_xLbBackgroundColor->SelectEntry(aColItem.GetColorValue());
+ m_rXFSet.Put( aColItem );
+
XFillBackgroundItem aBckItem( rSet->Get(XATTR_FILLBACKGROUND) );
if(aBckItem.GetValue())
m_xCbBackgroundColor->set_state(TRISTATE_TRUE);
@@ -269,10 +274,6 @@ void SvxHatchTabPage::Reset( const SfxItemSet* rSet )
m_xCbBackgroundColor->set_state(TRISTATE_FALSE);
m_rXFSet.Put( aBckItem );
- XFillColorItem aColItem( rSet->Get(XATTR_FILLCOLOR) );
- m_xLbBackgroundColor->SelectEntry(aColItem.GetColorValue());
- m_rXFSet.Put( aColItem );
-
m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
m_aCtlPreview.Invalidate();
}
More information about the Libreoffice-commits
mailing list