From: Jean-Baptiste M. <jb...@kd...> - 2012-12-16 23:05:37
|
Git commit 10ac0b917d1f4cad9e08fea4ac8dda37cd3103e1 by Jean-Baptiste Mardelle. Committed on 17/12/2012 at 00:05. Pushed by mardelle into branch 'master'. Fix keyframe position widget: http://www.kdenlive.org/mantis/view.php?id=2874 M +1 -1 src/keyframeedit.cpp M +8 -3 src/positionedit.cpp M +2 -2 src/positionedit.h http://commits.kde.org/kdenlive/10ac0b917d1f4cad9e08fea4ac8dda37cd3103e1 diff --git a/src/keyframeedit.cpp b/src/keyframeedit.cpp index 0d4bc1d..dfa4b57 100644 --- a/src/keyframeedit.cpp +++ b/src/keyframeedit.cpp @@ -334,7 +334,7 @@ void KeyframeEdit::slotAdjustKeyframeInfo(bool seek) max = getPos(below->row()) - 1; m_position->blockSignals(true); - m_position->setRange(min, max); + m_position->setRange(min, max, true); m_position->setPosition(getPos(item->row())); m_position->blockSignals(false); diff --git a/src/positionedit.cpp b/src/positionedit.cpp index ad8d4e1..c6aaae4 100644 --- a/src/positionedit.cpp +++ b/src/positionedit.cpp @@ -81,10 +81,15 @@ void PositionEdit::slotUpdatePosition() emit parameterChanged(m_display->getValue()); } -void PositionEdit::setRange(int min, int max) +void PositionEdit::setRange(int min, int max, bool absolute) { - m_slider->setRange(0, max - min); - m_display->setRange(0, max - min); + if (absolute) { + m_slider->setRange(min, max); + m_display->setRange(min, max); + } else { + m_slider->setRange(0, max - min); + m_display->setRange(0, max - min); + } } #include "positionedit.moc" diff --git a/src/positionedit.h b/src/positionedit.h index dda7b8e..2c5f243 100644 --- a/src/positionedit.h +++ b/src/positionedit.h @@ -1,5 +1,5 @@ /*************************************************************************** - geomeytrval.h - description + positionedit.h - description ------------------- begin : 03 Aug 2008 copyright : (C) 2008 by Marco Gittler @@ -37,7 +37,7 @@ public: void updateTimecodeFormat(); public slots: - void setRange(int min, int max); + void setRange(int min, int max, bool absolute = false); private: TimecodeDisplay *m_display; |