summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/controller/dialogs/res_Trendline.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index e1b6a070ce29..c8bba7e290b4 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -303,10 +303,11 @@ void TrendlineResources::FillValueSets()
void TrendlineResources::UpdateControlStates()
{
bool bMovingAverage = ( m_eTrendLineType == CHREGRESS_MOVING_AVERAGE );
+ bool bInterceptAvailable = ( m_eTrendLineType == CHREGRESS_LINEAR ) || ( m_eTrendLineType == CHREGRESS_POLYNOMIAL );
m_pNF_ExtrapolateForward->Enable(!bMovingAverage);
m_pNF_ExtrapolateBackward->Enable(!bMovingAverage);
- m_pCB_SetIntercept->Enable(!bMovingAverage);
- m_pFmtFld_InterceptValue->Enable(!bMovingAverage);
+ m_pCB_SetIntercept->Enable( bInterceptAvailable );
+ m_pFmtFld_InterceptValue->Enable( bInterceptAvailable );
if(bMovingAverage)
{
m_pCB_ShowEquation->SetState( STATE_NOCHECK );