Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
d4558cad
Commit
d4558cad
authored
Jan 15, 2021
by
Jean-Baptiste Mardelle
Browse files
Switch failed operation messages to ErrorMessage for better visibility
parent
26d74467
Pipeline
#47790
passed with stage
in 10 minutes and 41 seconds
Changes
12
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
src/assets/keyframes/view/keyframeview.cpp
View file @
d4558cad
...
...
@@ -163,7 +163,7 @@ void KeyframeView::slotRemoveKeyframe(QVector<int> positions)
{
if
(
m_model
->
singleKeyframe
())
{
// Don't allow zero keyframe
pCore
->
displayMessage
(
i18n
(
"Cannot remove the last keyframe"
),
MessageType
::
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Cannot remove the last keyframe"
),
MessageType
::
Error
Message
,
500
);
return
;
}
int
offset
=
pCore
->
getItemIn
(
m_model
->
getOwnerId
());
...
...
src/bin/bin.cpp
View file @
d4558cad
...
...
@@ -3075,7 +3075,7 @@ void Bin::slotItemDropped(const QStringList &ids, const QModelIndex &parent)
}
}
if
(
moveCommand
->
childCount
()
==
0
)
{
pCore
->
displayMessage
(
i18n
(
"No valid clip to insert"
),
MessageType
::
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"No valid clip to insert"
),
MessageType
::
Error
Message
,
500
);
}
else
{
m_doc
->
commandStack
()
->
push
(
moveCommand
);
}
...
...
@@ -3099,7 +3099,7 @@ void Bin::slotAddEffect(QString id, const QStringList &effectData)
return
;
}
}
pCore
->
displayMessage
(
i18n
(
"Select a clip to apply an effect"
),
MessageType
::
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Select a clip to apply an effect"
),
MessageType
::
Error
Message
,
500
);
}
void
Bin
::
slotEffectDropped
(
const
QStringList
&
effectData
,
const
QModelIndex
&
parent
)
...
...
@@ -3133,7 +3133,7 @@ void Bin::slotEffectDropped(const QStringList &effectData, const QModelIndex &pa
res
=
std
::
static_pointer_cast
<
ProjectClip
>
(
parentItem
)
->
addEffect
(
effectData
.
constFirst
());
}
if
(
!
res
)
{
pCore
->
displayMessage
(
i18n
(
"Cannot add effect to clip"
),
MessageType
::
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Cannot add effect to clip"
),
MessageType
::
Error
Message
);
}
else
{
m_proxyModel
->
selectionModel
()
->
clearSelection
();
const
QModelIndex
id
=
m_itemModel
->
index
(
row
,
0
,
parentIndex
);
...
...
@@ -3179,14 +3179,14 @@ void Bin::slotTagDropped(const QString &tag, const QModelIndex &parent)
return
;
}
}
pCore
->
displayMessage
(
i18n
(
"Select a clip to add a tag"
),
MessageType
::
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Select a clip to add a tag"
),
MessageType
::
Error
Message
);
}
void
Bin
::
switchTag
(
const
QString
&
tag
,
bool
add
)
{
const
QModelIndexList
indexes
=
m_proxyModel
->
selectionModel
()
->
selectedIndexes
();
if
(
indexes
.
isEmpty
())
{
pCore
->
displayMessage
(
i18n
(
"Select a clip to add a tag"
),
MessageType
::
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Select a clip to add a tag"
),
MessageType
::
Error
Message
);
}
// Check for folders
QList
<
QString
>
allClips
;
...
...
src/effects/effectstack/model/effectstackmodel.cpp
View file @
d4558cad
...
...
@@ -343,7 +343,7 @@ bool EffectStackModel::fromXml(const QDomElement &effectsXml, Fun &undo, Fun &re
continue
;
}
if
(
EffectsRepository
::
get
()
->
isUnique
(
effectId
)
&&
hasEffect
(
effectId
))
{
pCore
->
displayMessage
(
i18n
(
"Effect %1 cannot be added twice."
,
EffectsRepository
::
get
()
->
getName
(
effectId
)),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Effect %1 cannot be added twice."
,
EffectsRepository
::
get
()
->
getName
(
effectId
)),
Error
Message
);
return
false
;
}
bool
effectEnabled
=
true
;
...
...
@@ -428,7 +428,7 @@ bool EffectStackModel::copyEffect(const std::shared_ptr<AbstractEffectItem> &sou
std
::
shared_ptr
<
EffectItemModel
>
sourceEffect
=
std
::
static_pointer_cast
<
EffectItemModel
>
(
sourceItem
);
const
QString
effectId
=
sourceEffect
->
getAssetId
();
if
(
EffectsRepository
::
get
()
->
isUnique
(
effectId
)
&&
hasEffect
(
effectId
))
{
pCore
->
displayMessage
(
i18n
(
"Effect %1 cannot be added twice."
,
EffectsRepository
::
get
()
->
getName
(
effectId
)),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Effect %1 cannot be added twice."
,
EffectsRepository
::
get
()
->
getName
(
effectId
)),
Error
Message
);
return
false
;
}
bool
enabled
=
sourceEffect
->
isEnabled
();
...
...
@@ -481,7 +481,7 @@ bool EffectStackModel::appendEffect(const QString &effectId, bool makeCurrent)
{
QWriteLocker
locker
(
&
m_lock
);
if
(
EffectsRepository
::
get
()
->
isUnique
(
effectId
)
&&
hasEffect
(
effectId
))
{
pCore
->
displayMessage
(
i18n
(
"Effect %1 cannot be added twice."
,
EffectsRepository
::
get
()
->
getName
(
effectId
)),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Effect %1 cannot be added twice."
,
EffectsRepository
::
get
()
->
getName
(
effectId
)),
Error
Message
);
return
false
;
}
std
::
unordered_set
<
int
>
previousFadeIn
=
m_fadeIns
;
...
...
@@ -1000,7 +1000,7 @@ void EffectStackModel::importEffects(const std::weak_ptr<Mlt::Service> &service,
}
const
QString
effectId
=
qstrdup
(
filter
->
get
(
"kdenlive_id"
));
if
(
EffectsRepository
::
get
()
->
isUnique
(
effectId
)
&&
hasEffect
(
effectId
))
{
pCore
->
displayMessage
(
i18n
(
"Effect %1 cannot be added twice."
,
EffectsRepository
::
get
()
->
getName
(
effectId
)),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Effect %1 cannot be added twice."
,
EffectsRepository
::
get
()
->
getName
(
effectId
)),
Error
Message
);
continue
;
}
if
(
filter
->
get_int
(
"disable"
)
==
0
)
{
...
...
src/effects/effectstack/view/effectstackview.cpp
View file @
d4558cad
...
...
@@ -177,7 +177,7 @@ void EffectStackView::dropEvent(QDropEvent *event)
}
}
if
(
!
added
)
{
pCore
->
displayMessage
(
i18n
(
"Cannot add effect to clip"
),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Cannot add effect to clip"
),
Error
Message
);
}
else
{
m_scrollTimer
.
start
();
}
...
...
src/monitor/glwidget.cpp
View file @
d4558cad
...
...
@@ -1633,7 +1633,7 @@ void GLWidget::switchPlay(bool play, double speed)
bool
GLWidget
::
playZone
(
bool
loop
)
{
if
(
!
m_producer
||
m_proxy
->
zoneOut
()
<=
m_proxy
->
zoneIn
())
{
pCore
->
displayMessage
(
i18n
(
"Select a zone to play"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Select a zone to play"
),
Error
Message
,
500
);
return
false
;
}
m_producer
->
seek
(
m_proxy
->
zoneIn
());
...
...
@@ -1669,7 +1669,7 @@ bool GLWidget::restartConsumer()
bool
GLWidget
::
loopClip
(
QPoint
inOut
)
{
if
(
!
m_producer
||
inOut
.
y
()
<=
inOut
.
x
())
{
pCore
->
displayMessage
(
i18n
(
"Select a clip to play"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Select a clip to play"
),
Error
Message
,
500
);
return
false
;
}
m_loopIn
=
inOut
.
x
();
...
...
src/project/dialogs/noteswidget.cpp
View file @
d4558cad
...
...
@@ -191,7 +191,7 @@ void NotesWidget::assignProjectNote()
if
(
!
anchors
.
isEmpty
())
{
emit
reAssign
(
anchors
,
anchorPoints
);
}
else
{
pCore
->
displayMessage
(
i18n
(
"Select some timecodes to reassign"
),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Select some timecodes to reassign"
),
Error
Message
);
}
}
...
...
@@ -202,7 +202,7 @@ void NotesWidget::createMarkers()
if
(
!
anchors
.
isEmpty
())
{
createMarker
(
anchors
);
}
else
{
pCore
->
displayMessage
(
i18n
(
"Select some timecodes to create markers"
),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Select some timecodes to create markers"
),
Error
Message
);
}
}
...
...
src/project/notesplugin.cpp
View file @
d4558cad
...
...
@@ -74,7 +74,7 @@ void NotesPlugin::slotInsertTimecode()
QString
position
=
pCore
->
timecode
().
getTimecodeFromFrames
(
frames
);
const
QString
binId
=
pCore
->
monitorManager
()
->
clipMonitor
()
->
activeClipId
();
if
(
binId
.
isEmpty
())
{
pCore
->
displayMessage
(
i18n
(
"Cannot add note, no clip selected in project bin"
),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Cannot add note, no clip selected in project bin"
),
Error
Message
);
return
;
}
QString
clipName
=
pCore
->
bin
()
->
getBinClipName
(
binId
);
...
...
@@ -92,7 +92,7 @@ void NotesPlugin::slotReAssign(QStringList anchors, QList <QPoint> points)
int
ix
=
0
;
if
(
points
.
count
()
!=
anchors
.
count
())
{
// Something is wrong, abort
pCore
->
displayMessage
(
i18n
(
"Cannot perform assign"
),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Cannot perform assign"
),
Error
Message
);
return
;
}
for
(
const
QString
&
a
:
anchors
)
{
...
...
src/timeline2/model/timelinefunctions.cpp
View file @
d4558cad
...
...
@@ -285,7 +285,7 @@ bool TimelineFunctions::requestClipCutAll(std::shared_ptr<TimelineItemModel> tim
}
if
(
affectedTracks
.
isEmpty
())
{
pCore
->
displayMessage
(
i18n
(
"All tracks are locked"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"All tracks are locked"
),
Error
Message
,
500
);
return
false
;
}
...
...
@@ -307,7 +307,7 @@ bool TimelineFunctions::requestClipCutAll(std::shared_ptr<TimelineItemModel> tim
}
if
(
!
count
)
{
pCore
->
displayMessage
(
i18n
(
"No clips to cut"
),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"No clips to cut"
),
Error
Message
);
}
else
{
pCore
->
pushUndo
(
undo
,
redo
,
i18n
(
"Cut all clips"
));
}
...
...
@@ -447,7 +447,7 @@ bool TimelineFunctions::insertZone(const std::shared_ptr<TimelineItemModel> &tim
if
(
res
)
{
pCore
->
pushUndo
(
undo
,
redo
,
overwrite
?
i18n
(
"Overwrite zone"
)
:
i18n
(
"Insert zone"
));
}
else
{
pCore
->
displayMessage
(
i18n
(
"Could not insert zone"
),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Could not insert zone"
),
Error
Message
);
undo
();
}
return
res
;
...
...
@@ -480,7 +480,7 @@ bool TimelineFunctions::insertZone(const std::shared_ptr<TimelineItemModel> &tim
}
}
if
(
affectedTracks
.
isEmpty
())
{
pCore
->
displayMessage
(
i18n
(
"Please activate a track by clicking on a track's label"
),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Please activate a track by clicking on a track's label"
),
Error
Message
);
return
false
;
}
result
=
breakAffectedGroups
(
timeline
,
affectedTracks
,
QPoint
(
insertFrame
,
insertFrame
+
(
zone
.
y
()
-
zone
.
x
())),
undo
,
redo
);
...
...
@@ -950,7 +950,7 @@ QStringList TimelineFunctions::enableMultitrackView(const std::shared_ptr<Timeli
videoTracks
.
push_back
(
tid
);
}
if
(
videoTracks
.
size
()
<
2
)
{
pCore
->
displayMessage
(
i18n
(
"Cannot enable multitrack view on a single track"
),
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"Cannot enable multitrack view on a single track"
),
Error
Message
);
}
// First, dis/enable track compositing
QScopedPointer
<
Mlt
::
Service
>
service
(
timeline
->
m_tractor
->
field
());
...
...
@@ -1413,7 +1413,7 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
qDebug
()
<<
" / / READING CLIPS FROM CLIPBOARD"
;
}
else
{
semaphore
.
release
(
1
);
pCore
->
displayMessage
(
i18n
(
"No valid data in clipboard"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"No valid data in clipboard"
),
Error
Message
,
500
);
return
false
;
}
const
QString
docId
=
copiedItems
.
documentElement
().
attribute
(
QStringLiteral
(
"documentid"
));
...
...
@@ -1439,7 +1439,7 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
QDomElement
prod
=
clips
.
at
(
i
).
toElement
();
int
trackPos
=
prod
.
attribute
(
QStringLiteral
(
"track"
)).
toInt
();
if
(
trackPos
<
0
)
{
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Error
Message
,
500
);
semaphore
.
release
(
1
);
return
false
;
}
...
...
@@ -1497,7 +1497,7 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
int
requestedVideoTracks
=
videoTracks
.
isEmpty
()
?
0
:
videoTracks
.
last
()
-
videoTracks
.
first
()
+
1
;
int
requestedAudioTracks
=
audioTracks
.
isEmpty
()
?
0
:
audioTracks
.
last
()
-
audioTracks
.
first
()
+
1
;
if
(
requestedVideoTracks
>
projectTracks
.
second
.
size
()
||
requestedAudioTracks
>
projectTracks
.
first
.
size
())
{
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Error
Message
,
500
);
semaphore
.
release
(
1
);
return
false
;
}
...
...
@@ -1526,7 +1526,7 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
if
(
requestedAudioTracks
>
0
&&
projectTracks
.
first
.
size
()
<=
(
projectTracks
.
second
.
indexOf
(
trackId
)
+
topAudioOffset
))
{
int
updatedPos
=
projectTracks
.
first
.
size
()
-
topAudioOffset
-
1
;
if
(
updatedPos
<
0
||
updatedPos
>=
projectTracks
.
second
.
size
())
{
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Error
Message
,
500
);
semaphore
.
release
(
1
);
return
false
;
}
...
...
@@ -1557,7 +1557,7 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
for
(
int
tk
:
qAsConst
(
videoTracks
))
{
int
newPos
=
masterIx
+
tk
-
masterSourceTrack
;
if
(
newPos
<
0
||
newPos
>=
projectTracks
.
second
.
size
())
{
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Error
Message
,
500
);
semaphore
.
release
(
1
);
return
false
;
}
...
...
@@ -1591,7 +1591,7 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
}
int
offsetId
=
oldPos
+
audioOffset
;
if
(
offsetId
<
0
||
offsetId
>=
projectTracks
.
first
.
size
())
{
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Error
Message
,
500
);
semaphore
.
release
(
1
);
return
false
;
}
...
...
@@ -1661,7 +1661,7 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
clipsImported
=
true
;
bool
insert
=
pCore
->
projectItemModel
()
->
requestAddBinClip
(
clipId
,
currentProd
,
folderId
,
undo
,
redo
,
callBack
);
if
(
!
insert
)
{
pCore
->
displayMessage
(
i18n
(
"Could not add bin clip"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Could not add bin clip"
),
Error
Message
,
500
);
undo
();
semaphore
.
release
(
1
);
return
false
;
...
...
@@ -1705,7 +1705,7 @@ bool TimelineFunctions::pasteTimelineClips(const std::shared_ptr<TimelineItemMod
int
curTrackId
=
tracksMap
.
value
(
prod
.
attribute
(
QStringLiteral
(
"track"
)).
toInt
());
if
(
!
timeline
->
isTrack
(
curTrackId
))
{
// Something is broken
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Not enough tracks to paste clipboard"
),
Error
Message
,
500
);
timeline_undo
();
semaphore
.
release
(
1
);
return
false
;
...
...
@@ -1721,7 +1721,7 @@ bool TimelineFunctions::pasteTimelineClips(const std::shared_ptr<TimelineItemMod
bool
created
=
timeline
->
requestClipCreation
(
originalId
,
newId
,
timeline
->
getTrackById_const
(
curTrackId
)
->
trackType
(),
audioStream
,
speed
,
warp_pitch
,
timeline_undo
,
timeline_redo
);
if
(
!
created
)
{
// Something is broken
pCore
->
displayMessage
(
i18n
(
"Could not paste items in timeline"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Could not paste items in timeline"
),
Error
Message
,
500
);
timeline_undo
();
semaphore
.
release
(
1
);
return
false
;
...
...
@@ -1781,7 +1781,7 @@ bool TimelineFunctions::pasteTimelineClips(const std::shared_ptr<TimelineItemMod
}
if
(
!
res
)
{
timeline_undo
();
pCore
->
displayMessage
(
i18n
(
"Could not paste items in timeline"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Could not paste items in timeline"
),
Error
Message
,
500
);
semaphore
.
release
(
1
);
return
false
;
}
...
...
src/timeline2/model/timelinemodel.cpp
View file @
d4558cad
...
...
@@ -798,9 +798,10 @@ bool TimelineModel::requestClipMove(int clipId, int trackId, int position, bool
bool
TimelineModel
::
mixClip
(
int
idToMove
,
int
delta
)
{
int
selectedTrack
=
-
1
;
qDebug
()
<<
"==== REQUEST CLIP MIX STEP 1"
;
std
::
unordered_set
<
int
>
initialSelection
=
getCurrentSelection
();
if
(
idToMove
==
-
1
&&
initialSelection
.
empty
())
{
pCore
->
displayMessage
(
i18n
(
"Select a clip to apply the mix"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Select a clip to apply the mix"
),
Error
Message
,
500
);
return
false
;
}
std
::
pair
<
int
,
int
>
clipsToMix
;
...
...
@@ -884,12 +885,12 @@ bool TimelineModel::mixClip(int idToMove, int delta)
break
;
}
}
if
(
noSpaceInClip
>
0
)
{
pCore
->
displayMessage
(
i18n
(
"Not enough frames at clip %1 to apply the mix"
,
noSpaceInClip
==
1
?
i18n
(
"start"
)
:
i18n
(
"end"
)),
ErrorMessage
,
500
);
return
false
;
}
if
(
idToMove
==
-
1
||
!
isClip
(
idToMove
))
{
if
(
noSpaceInClip
>
0
)
{
pCore
->
displayMessage
(
i18n
(
"Not enough frames at clip %1 to apply the mix"
,
noSpaceInClip
==
1
?
i18n
(
"start"
)
:
i18n
(
"end"
)),
InformationMessage
,
500
);
}
else
{
pCore
->
displayMessage
(
i18n
(
"Select a clip to apply the mix"
),
InformationMessage
,
500
);
}
pCore
->
displayMessage
(
i18n
(
"Select a clip to apply the mix"
),
ErrorMessage
,
500
);
return
false
;
}
...
...
@@ -1511,7 +1512,7 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
}
}
if
(
useTargets
&&
allowedTracks
.
isEmpty
())
{
pCore
->
displayMessage
(
i18n
(
"No available track for insert operation"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"No available track for insert operation"
),
Error
Message
,
500
);
return
false
;
}
bool
result
=
requestClipInsertion
(
binClipId
,
trackId
,
position
,
id
,
logUndo
,
refreshView
,
useTargets
,
undo
,
redo
,
allowedTracks
);
...
...
@@ -2869,7 +2870,7 @@ bool TimelineModel::removeMix(int cid)
if
(
res
)
{
PUSH_UNDO
(
undo
,
redo
,
i18n
(
"Remove mix"
));
}
else
{
pCore
->
displayMessage
(
i18n
(
"Removing mix failed"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Removing mix failed"
),
Error
Message
,
500
);
}
return
res
;
}
...
...
@@ -3430,7 +3431,7 @@ bool TimelineModel::requestTrackDeletion(int trackId, Fun &undo, Fun &redo)
{
Q_ASSERT
(
isTrack
(
trackId
));
if
(
m_allTracks
.
size
()
<
2
)
{
pCore
->
displayMessage
(
i18n
(
"Cannot delete last track in timeline"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Cannot delete last track in timeline"
),
Error
Message
,
500
);
return
false
;
}
// Discard running jobs
...
...
@@ -3663,7 +3664,7 @@ bool TimelineModel::addTrackEffect(int trackId, const QString &effectId)
Q_ASSERT
(
m_iteratorTable
.
count
(
trackId
)
>
0
);
if
((
*
m_iteratorTable
.
at
(
trackId
))
->
addEffect
(
effectId
)
==
false
)
{
QString
effectName
=
EffectsRepository
::
get
()
->
getName
(
effectId
);
pCore
->
displayMessage
(
i18n
(
"Cannot add effect %1 to selected track"
,
effectName
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Cannot add effect %1 to selected track"
,
effectName
),
Error
Message
,
500
);
return
false
;
}
return
true
;
...
...
@@ -3678,7 +3679,7 @@ bool TimelineModel::copyTrackEffect(int trackId, const QString &sourceId)
int
itemRow
=
source
.
at
(
2
).
toInt
();
std
::
shared_ptr
<
EffectStackModel
>
effectStack
=
pCore
->
getItemEffectStack
(
itemType
,
itemId
);
if
((
*
m_iteratorTable
.
at
(
trackId
))
->
copyEffect
(
effectStack
,
itemRow
)
==
false
)
{
pCore
->
displayMessage
(
i18n
(
"Cannot paste effect to selected track"
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Cannot paste effect to selected track"
),
Error
Message
,
500
);
return
false
;
}
return
true
;
...
...
@@ -3696,7 +3697,7 @@ bool TimelineModel::addClipEffect(int clipId, const QString &effectId, bool noti
bool
result
=
m_allClips
.
at
(
clipId
)
->
addEffect
(
effectId
);
if
(
!
result
&&
notify
)
{
QString
effectName
=
EffectsRepository
::
get
()
->
getName
(
effectId
);
pCore
->
displayMessage
(
i18n
(
"Cannot add effect %1 to selected clip"
,
effectName
),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Cannot add effect %1 to selected clip"
,
effectName
),
Error
Message
,
500
);
}
return
result
;
}
...
...
src/timeline2/model/trackmodel.cpp
View file @
d4558cad
...
...
@@ -1648,7 +1648,7 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
// check if we have enough frames, or limit duration
int
leftFrames
=
secondClip
->
getIn
();
if
(
leftFrames
<
3
)
{
pCore
->
displayMessage
(
i18n
(
"Not enough frames at clip %1 to apply the mix"
,
i18n
(
"start"
)),
Information
Message
,
500
);
pCore
->
displayMessage
(
i18n
(
"Not enough frames at clip %1 to apply the mix"
,
i18n
(
"start"
)),
Error
Message
,
500
);
return
false
;
}
if
(
leftFrames
<
mixDuration
/
2
)
{
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
d4558cad
This diff is collapsed.
Click to expand it.
src/timeline2/view/timelinewidget.cpp
View file @
d4558cad
...
...
@@ -279,7 +279,7 @@ void TimelineWidget::showTargetMenu(int tid)
return
;
}
if
(
m_proxy
->
clipTargets
()
<
2
||
!
model
()
->
isAudioTrack
(
tid
))
{
pCore
->
displayMessage
(
i18n
(
"No available stream"
),
MessageType
::
Information
Message
);
pCore
->
displayMessage
(
i18n
(
"No available stream"
),
MessageType
::
Error
Message
);
return
;
}
QVariant
returnedValue
;
...
...
Eugen Mohr
@emohr
mentioned in issue
#916 (closed)
·
Jan 15, 2021
mentioned in issue
#916 (closed)
mentioned in issue #916
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment