[Libreoffice-commits] core.git: chart2/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 22 09:02:16 UTC 2021


 chart2/source/controller/dialogs/res_Trendline.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 26d23c96d449c201e50df04023d9cbfd59d3d133
Author:     Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
AuthorDate: Thu Feb 18 10:40:07 2021 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
CommitDate: Mon Feb 22 10:01:31 2021 +0100

    Trendline dlg: Enable widgets only when matching type is selected
    
    Change-Id: Ia232683aafdfe8d2b32be985476cb20702fc807c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111104
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>

diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index 6d994e13bc6d..e1ccd666414c 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -363,6 +363,7 @@ void TrendlineResources::UpdateControlStates()
         m_xNF_Period->set_max(m_nNbPoints - 1);
     }
     bool bMovingAverage = ( m_eTrendLineType == SvxChartRegress::MovingAverage );
+    bool bPolynomial = ( m_eTrendLineType == SvxChartRegress::Polynomial );
     bool bInterceptAvailable = ( m_eTrendLineType == SvxChartRegress::Linear )
                             || ( m_eTrendLineType == SvxChartRegress::Polynomial )
                             || ( m_eTrendLineType == SvxChartRegress::Exp );
@@ -378,6 +379,8 @@ void TrendlineResources::UpdateControlStates()
     m_xCB_ShowEquation->set_sensitive( !bMovingAverage );
     m_xCB_ShowCorrelationCoeff->set_sensitive( !bMovingAverage );
     m_xCB_RegressionMovingType->set_sensitive(bMovingAverage);
+    m_xNF_Period->set_sensitive(bMovingAverage);
+    m_xNF_Degree->set_sensitive(bPolynomial);
     m_xEE_XName->set_sensitive( !bMovingAverage && m_xCB_ShowEquation->get_active() );
     m_xEE_YName->set_sensitive( !bMovingAverage && m_xCB_ShowEquation->get_active() );
 }


More information about the Libreoffice-commits mailing list