diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-02-11 13:52:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-02-11 16:53:10 +0100 |
commit | c7ad7849d54fd3dad67e7779102f65b8b2f04881 (patch) | |
tree | b315591d2761126f2b73b9d9b9ae97eb8357c44a /chart2/source/controller | |
parent | 4bb482cc2e65a10fd4f38cddfab405169cf192e4 (diff) |
Resolves: tdf#123231 spin-button focus loss triggers changing active radio
Change-Id: I6562631df4225d5aa4fe650c40be7c0424eb5621
Reviewed-on: https://gerrit.libreoffice.org/67689
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source/controller')
-rw-r--r-- | chart2/source/controller/dialogs/res_Trendline.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index 1e39e1fdfb86..a888b49f7e8f 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -160,6 +160,8 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) m_xNF_Degree->set_value( 2 ); } + m_xNF_Degree->save_value(); + if( rInAttrs.GetItemState( SCHATTR_REGRESSION_PERIOD, true, &pPoolItem ) == SfxItemState::SET ) { sal_Int32 nPeriod = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); @@ -170,6 +172,8 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) m_xNF_Period->set_value( 2 ); } + m_xNF_Period->save_value(); + double nValue = 0.0; if( rInAttrs.GetItemState( SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, true, &pPoolItem ) == SfxItemState::SET ) { @@ -338,7 +342,7 @@ IMPL_LINK(TrendlineResources, ChangeSpinValue, weld::SpinButton&, rNumericField, { if (&rNumericField == m_xNF_Degree.get()) { - if (!m_xRB_Polynomial->get_active()) + if (!m_xRB_Polynomial->get_active() && m_xNF_Degree->get_value_changed_from_saved()) { m_xRB_Polynomial->set_active(true); SelectTrendLine(*m_xRB_Polynomial); @@ -346,7 +350,7 @@ IMPL_LINK(TrendlineResources, ChangeSpinValue, weld::SpinButton&, rNumericField, } else if (&rNumericField == m_xNF_Period.get()) { - if (!m_xRB_MovingAverage->get_active()) + if (!m_xRB_MovingAverage->get_active() && m_xNF_Period->get_value_changed_from_saved()) { m_xRB_MovingAverage->set_active(true); SelectTrendLine(*m_xRB_MovingAverage); |