mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
Improved animation control
Fixed double redraw related to update of the time step in the combo box called during use of the animation toolbar p4#: 22098
This commit is contained in:
1 parent
3f61c26f0b
commit
adff387d36
2 files changed
+15
-1
No files matched your search
@@ -172,7 +172,7 @@ 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)), m_timestepCombo, SLOT(setCurrentIndex (int)));
|
||||
connect(animationControl, SIGNAL(changeFrame(int)), SLOT(slotUpdateComboBoxIndex(int)));
|
||||
connect(animationControl, SIGNAL(frameCountChanged(int)), this, SLOT(slotUpdateTimestepList(int)));
|
||||
int timeout = animationControl->timeout();
|
||||
double initialFrameRate = 1000;
|
||||
@@ -318,4 +318,17 @@ void AnimationToolBar::slotFwdBwdModeToggled(bool on)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void AnimationToolBar::slotUpdateComboBoxIndex(int value)
|
||||
{
|
||||
// Update only the combo box index, but do not set current frame
|
||||
// Disconnect the signal temporarily when updating UI
|
||||
|
||||
disconnect(m_timestepCombo, SIGNAL(currentIndexChanged(int)), m_activeAnimationControl, SLOT(setCurrentFrame(int)));
|
||||
m_timestepCombo->setCurrentIndex(value);
|
||||
connect(m_timestepCombo, SIGNAL(currentIndexChanged(int)), m_activeAnimationControl, SLOT(setCurrentFrame(int)));
|
||||
}
|
||||
|
||||
} // End namespace caf
|
||||
Reference in new issue
Block a user