fdo#40315 Improve UI for moving average trendline

If moving average trendline is selected, show equation is
uncheked, and all options disable

Change-Id: Ic25c09b8c8410a12ac9f14cb0ba7833f304053ee
Reviewed-on: https://gerrit.libreoffice.org/6796
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Laurent Balland-Poirier
2013-11-24 22:38:04 +01:00
committed by Tomaž Vajngerl
parent 4995c2e877
commit 382ceea544

View File

@@ -292,6 +292,18 @@ void TrendlineResources::FillValueSets()
void TrendlineResources::UpdateControlStates()
{
bool bMovingAverage = ( m_eTrendLineType == CHREGRESS_MOVING_AVERAGE );
m_pNF_ExtrapolateForward->Enable(!bMovingAverage);
m_pNF_ExtrapolateBackward->Enable(!bMovingAverage);
m_pCB_SetIntercept->Enable(!bMovingAverage);
m_pNF_InterceptValue->Enable(!bMovingAverage);
if(bMovingAverage)
{
m_pCB_ShowEquation->SetState( STATE_NOCHECK );
m_pCB_ShowCorrelationCoeff->SetState( STATE_NOCHECK );
}
m_pCB_ShowEquation->Enable(!bMovingAverage);
m_pCB_ShowCorrelationCoeff->Enable(!bMovingAverage);
}
} // namespace chart