Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Don't activate clip tools (add compo/fades) when clicking on a composition

parent 4d731e2d
Pipeline #1614 passed with stage
in 14 minutes and 10 seconds
......@@ -441,7 +441,7 @@ Rectangle {
border.width: 2
border.color: 'green'
opacity: 0
enabled: !clipRoot.isAudio
enabled: !clipRoot.isAudio && !dragProxy.isComposition
MouseArea {
id: compInArea
anchors.fill: parent
......@@ -491,13 +491,16 @@ Rectangle {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.opacity = 0.7
onEntered: {
parent.opacity = 0.7
parent.visible = true
}
onExited: {
if (!pressed) {
parent.opacity = 0
}
parent.opacity = 0
parent.visible = false
}
onPressed: {
parent.visible = false
timeline.addCompositionToClip('', clipRoot.clipId, clipRoot.clipDuration - 1)
}
ToolTip {
......@@ -540,7 +543,7 @@ Rectangle {
color: '#FF66FFFF'
border.width: 2
border.color: 'green'
enabled: !isLocked
enabled: !isLocked && !dragProxy.isComposition
opacity: 0
Drag.active: fadeInMouseArea.drag.active
MouseArea {
......@@ -639,7 +642,7 @@ Rectangle {
border.width: 2
border.color: 'red'
opacity: 0
enabled: !isLocked
enabled: !isLocked && !dragProxy.isComposition
Drag.active: fadeOutMouseArea.drag.active
MouseArea {
id: fadeOutMouseArea
......
......@@ -118,17 +118,6 @@ Item {
anchors.fill: displayRect
acceptedButtons: Qt.RightButton
hoverEnabled: true
/*onPressed: {
root.stopScrolling = true
originalX = compositionRoot.x
originalTrackId = compositionRoot.trackId
startX = compositionRoot.x
compositionRoot.forceActiveFocus();
focus = true
if (!compositionRoot.selected) {
compositionRoot.clicked(compositionRoot, mouse.modifiers === Qt.ShiftModifier)
}
}*/
Keys.onShortcutOverride: event.accepted = compositionRoot.isGrabbed && (event.key === Qt.Key_Left || event.key === Qt.Key_Right || event.key === Qt.Key_Up || event.key === Qt.Key_Down)
Keys.onLeftPressed: {
controller.requestCompositionMove(compositionRoot.clipId, compositionRoot.originalTrackId, compositionRoot.modelStart - 1, true, true)
......
......@@ -1427,15 +1427,19 @@ void TimelineController::switchEnableState(int clipId)
void TimelineController::addCompositionToClip(const QString &assetId, int clipId, int offset)
{
int track = m_model->getClipTrackId(clipId);
int compoId = -1;
if (assetId.isEmpty()) {
QStringList compositions = KdenliveSettings::favorite_transitions();
if (compositions.isEmpty()) {
pCore->displayMessage(i18n("Select a favorite composition"), InformationMessage, 500);
return;
}
insertNewComposition(track, clipId, offset, compositions.first(), true);
compoId = insertNewComposition(track, clipId, offset, compositions.first(), true);
} else {
insertNewComposition(track, clipId, offset, assetId, true);
compoId = insertNewComposition(track, clipId, offset, assetId, true);
}
if (compoId > 0) {
m_model->requestSetSelection({compoId});
}
}
......
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