[Libreoffice-commits] core.git: chart2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 11 15:53:34 UTC 2019
chart2/source/controller/dialogs/res_Trendline.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit c7ad7849d54fd3dad67e7779102f65b8b2f04881
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Feb 11 13:52:39 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Feb 11 16:53:10 2019 +0100
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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);
More information about the Libreoffice-commits
mailing list