[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - chart2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Feb 12 12:53:34 UTC 2019


 chart2/source/controller/dialogs/res_Trendline.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 6b5807851357059cdfc54a6870498baea6d92ee0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Feb 11 13:52:39 2019 +0000
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue Feb 12 13:53:11 2019 +0100

    Resolves: tdf#123231 spin-button focus loss triggers changing active radio
    
    Change-Id: I6562631df4225d5aa4fe650c40be7c0424eb5621
    Reviewed-on: https://gerrit.libreoffice.org/67690
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index 8f140428a9da..daced4abad31 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -164,6 +164,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();
@@ -174,6 +176,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 )
     {
@@ -342,7 +346,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);
@@ -350,7 +354,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