Fix clip monitor ruler not always adjusting to correct length

parent 3f3e2ee7
Pipeline #15855 passed with stage
in 14 minutes and 7 seconds
......@@ -1401,9 +1401,9 @@ void Monitor::slotOpenClip(const std::shared_ptr<ProjectClip> &controller, int i
// we are in record mode, don't display clip
return;
}
m_timePos->setRange(0, (int)m_controller->frameDuration() - 1);
m_glMonitor->setRulerInfo((int)m_controller->frameDuration() - 1, controller->getMarkerModel());
loadQmlScene(MonitorSceneDefault);
m_timePos->setRange(0, (int)m_controller->frameDuration() - 1);
updateMarkers();
connect(m_glMonitor->getControllerProxy(), &MonitorProxy::addSnap, this, &Monitor::addSnapPoint, Qt::DirectConnection);
connect(m_glMonitor->getControllerProxy(), &MonitorProxy::removeSnap, this, &Monitor::removeSnapPoint, Qt::DirectConnection);
......
......@@ -25,7 +25,7 @@ Item {
onSourcedarChanged: refreshdar()
property bool iskeyframe
property int requestedKeyFrame
property real baseUnit: fontMetrics.font.pointSize
property real baseUnit: fontMetrics.font.pixelSize * 0.8
property int duration: 300
property int mouseRulerPos: 0
property double frameSize: 10
......
......@@ -21,7 +21,7 @@ Item {
property double timeScale: 1
property double frameSize: 10
property int duration: 300
property real baseUnit: fontMetrics.font.pointSize
property real baseUnit: fontMetrics.font.pixelSize * 0.8
property int mouseRulerPos: 0
onScalexChanged: canvas.requestPaint()
onScaleyChanged: canvas.requestPaint()
......@@ -227,8 +227,8 @@ Item {
left: parent.left
}
visible: root.iskeyframe
width: effectsize.height * 0.7
height: this.width
width: root.baseUnit
height: width
color: "red"
MouseArea {
property int oldMouseX
......@@ -303,8 +303,8 @@ Item {
top: parent.top
right: parent.right
}
width: effectsize.height * 0.7
height: this.width
width: root.baseUnit
height: width
color: "red"
visible: root.iskeyframe
MouseArea {
......@@ -369,8 +369,8 @@ Item {
bottom: parent.bottom
left: parent.left
}
width: effectsize.height * 0.7
height: this.width
width: root.baseUnit
height: width
color: "red"
visible: root.iskeyframe
MouseArea {
......@@ -435,8 +435,8 @@ Item {
bottom: parent.bottom
right: parent.right
}
width: effectsize.height * 0.7
height: this.width
width: root.baseUnit
height: width
color: "red"
visible: root.iskeyframe
MouseArea {
......
......@@ -12,7 +12,7 @@ Item {
property string framenum
property point profile: controller.profile
property point center
property real baseUnit: fontMetrics.font.pointSize
property real baseUnit: fontMetrics.font.pixelSize * 0.8
property double scalex : 1
property double scaley : 1
property double stretch : 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment