Commit a5fae71b authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Ensure record control is visible in track head when enabled

parent de4507f4
Pipeline #175636 passed with stage
in 10 minutes and 6 seconds
......@@ -36,6 +36,13 @@ Rectangle {
onIsLockedChanged: {
flashLock.restart();
}
onShowAudioRecordChanged: {
if (showAudioRecord && trackHeadRoot.height < 2 * root.collapsedHeight + resizer.height) {
// Ensure trackheight is large enough to have the vu-meter visible
timeline.adjustTrackHeight(trackHeadRoot.trackId, 2 * root.collapsedHeight + resizer.height)
}
}
color: getTrackColor(isAudio, true)
//border.color: selected? 'red' : 'transparent'
......@@ -516,11 +523,11 @@ Rectangle {
anchors.left: trackHeadColumn.left
anchors.right: trackHeadColumn.right
anchors.margins: 2
height: showAudioRecord ? root.collapsedHeight : 0
height: showAudioRecord ? root.collapsedHeight - 4 : 0
Loader {
id: audioVuMeter
anchors.fill: parent
visible: showAudioRecord && (trackHeadRoot.height >= 2 * muteButton.height + resizer.height)
visible: showAudioRecord && (trackHeadRoot.height >= 2 * root.collapsedHeight + resizer.height)
source: isAudio && showAudioRecord ? "AudioLevels.qml" : ""
onLoaded: item.trackId = trackId
onVisibleChanged: {
......
......@@ -1328,6 +1328,17 @@ void TimelineController::showTrackAsset(int trackId)
emit showItemEffectStack(getTrackNameFromIndex(trackId), m_model->getTrackEffectStackModel(trackId), pCore->getCurrentFrameSize(), false);
}
void TimelineController::adjustTrackHeight(int trackId, int height)
{
if (trackId > -1) {
m_model->getTrackById(trackId)->setProperty(QStringLiteral("kdenlive:trackheight"), QString::number(height));
m_model->setTrackProperty(trackId, "kdenlive:collapsed", QStringLiteral("0"));
QModelIndex modelStart = m_model->makeTrackIndexFromID(trackId);
emit m_model->dataChanged(modelStart, modelStart, {TimelineModel::HeightRole});
return;
}
}
void TimelineController::adjustAllTrackHeight(int trackId, int height)
{
bool isAudio = m_model->getTrackById_const(trackId)->isAudioTrack();
......
......@@ -337,6 +337,7 @@ public:
Q_INVOKABLE void showTrackAsset(int trackId);
/** @brief Adjust height of all similar (audio or video) tracks
*/
Q_INVOKABLE void adjustTrackHeight(int trackId, int height);
Q_INVOKABLE void adjustAllTrackHeight(int trackId, int height);
Q_INVOKABLE void collapseAllTrackHeight(int trackId, bool collapse, int collapsedHeight);
......
  • Track record: Only audio clips in the timeline. Click into the timeline after the last audio clip. Start record -> playhead jumps back to the end of the last audio clip but the playhead doesn't start moving -> stop record -> audio file get created.

    Click record again -> now the playhead start moving -> stop record -> audio file get created.

    Put the playhead between audio clips -> click record again -> now the playhead start moving

    The playhead should always moving while recording.

  • mentioned in commit d84fa82f

    Toggle commit list
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