Kaydet (Commit) 22347f61 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#66815 avoid resetting the selection when values are unchanged

Change-Id: I88534e0b0e8302630193f77d2d85c4029a5a8f52
üst d55c0c90
...@@ -325,6 +325,7 @@ public: ...@@ -325,6 +325,7 @@ public:
/** Set the width in Twips */ /** Set the width in Twips */
void SetWidth( long nWidth ); void SetWidth( long nWidth );
long GetWidth() const { return m_nWidth; }
void SetNone( const XubString& sNone ); void SetNone( const XubString& sNone );
using ListBox::InsertEntry; using ListBox::InsertEntry;
...@@ -356,7 +357,7 @@ public: ...@@ -356,7 +357,7 @@ public:
inline FieldUnit GetSourceUnit() const { return eSourceUnit; } inline FieldUnit GetSourceUnit() const { return eSourceUnit; }
void SetColor( const Color& rColor ); void SetColor( const Color& rColor );
inline Color GetColor( void ) const; Color GetColor() const { return aColor; }
protected: protected:
...@@ -389,11 +390,6 @@ inline void LineListBox::SetColor( const Color& rColor ) ...@@ -389,11 +390,6 @@ inline void LineListBox::SetColor( const Color& rColor )
UpdateEntries( m_nWidth ); UpdateEntries( m_nWidth );
} }
inline Color LineListBox::GetColor( void ) const
{
return aColor;
}
const Color& LineListBox::GetPaintColor( void ) const const Color& LineListBox::GetPaintColor( void ) const
{ {
return maPaintCol; return maPaintCol;
......
...@@ -731,8 +731,13 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ ) ...@@ -731,8 +731,13 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ )
m_pLinePosLbl->Enable( bEnable ); m_pLinePosLbl->Enable( bEnable );
m_pLinePosDLB->Enable( bEnable ); m_pLinePosDLB->Enable( bEnable );
m_pLineTypeDLB->SetWidth( nLineWidth ); //fdo#66815 if the values are going to be the same, don't update
m_pLineTypeDLB->SetColor( m_pLineColorDLB->GetSelectEntryColor( ) ); //them to avoid the listbox selection resetting
if (nLineWidth != m_pLineTypeDLB->GetWidth())
m_pLineTypeDLB->SetWidth(nLineWidth);
Color aColor(m_pLineColorDLB->GetSelectEntryColor());
if (aColor != m_pLineTypeDLB->GetColor())
m_pLineTypeDLB->SetColor(aColor);
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment