mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Avoid multiple qt connections anim-control->toolbar
This commit is contained in:
parent
9582c27e97
commit
3ba140abde
@ -148,7 +148,8 @@ void AnimationToolBar::connectAnimationControl(caf::FrameAnimationControl* anima
|
||||
// Animation action connections
|
||||
if (m_activeAnimationControl)
|
||||
{
|
||||
m_activeAnimationControl->disconnect(m_timestepCombo, SLOT(setCurrentIndex(int)));
|
||||
m_activeAnimationControl->disconnect(this, SLOT(slotUpdateComboBoxIndex(int)));
|
||||
m_activeAnimationControl->disconnect(this, SLOT(slotUpdateTimestepList(int)));
|
||||
}
|
||||
|
||||
m_activeAnimationControl = animationControl;
|
||||
@ -179,8 +180,10 @@ void AnimationToolBar::connectAnimationControl(caf::FrameAnimationControl* anima
|
||||
connect(m_animSkipToEndAction, SIGNAL(triggered()), animationControl, SLOT(slotSkipToEnd()));
|
||||
|
||||
connect(m_animPlayBwdAction ,SIGNAL(triggered()), animationControl, SLOT(slotPlayBwd()));
|
||||
|
||||
m_animRepeatFromStartAction->setChecked(animationControl->isRepeatingFromStart());
|
||||
m_animRepeatFwdBwdAction->setChecked(animationControl->isRepeatingFwdBwd());
|
||||
|
||||
connect(m_animRepeatFromStartAction,SIGNAL(triggered(bool)), animationControl, SLOT(slotRepeatFromStart(bool)));
|
||||
connect(m_animRepeatFwdBwdAction ,SIGNAL(triggered(bool)), animationControl, SLOT(slotRepeatFwdBwd(bool)));
|
||||
|
||||
@ -190,8 +193,9 @@ void AnimationToolBar::connectAnimationControl(caf::FrameAnimationControl* anima
|
||||
connect(m_timestepCombo, SIGNAL(currentIndexChanged(int)), animationControl, SLOT(setCurrentFrame(int)));
|
||||
connect(m_frameRateSlider, SIGNAL(valueChanged(int)), this, SLOT(slotFrameRateSliderChanged(int)));
|
||||
|
||||
connect(animationControl, SIGNAL(changeFrame(int)), SLOT(slotUpdateComboBoxIndex(int)));
|
||||
connect(animationControl, SIGNAL(changeFrame(int)), this, SLOT(slotUpdateComboBoxIndex(int)));
|
||||
connect(animationControl, SIGNAL(frameCountChanged(int)), this, SLOT(slotUpdateTimestepList(int)));
|
||||
|
||||
int timeout = animationControl->timeout();
|
||||
double initialFrameRate = 1000;
|
||||
if (timeout > 0) initialFrameRate = 1000.0/timeout;
|
||||
|
Loading…
Reference in New Issue
Block a user