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

Don't allow removing the only keyframe in an effect (was possible from the on...

Don't allow removing the only keyframe in an effect (was possible from the on monitor toolbar and crashing)
parent e2f9b806
......@@ -134,6 +134,11 @@ void KeyframeView::slotEditType(int type, const QPersistentModelIndex &index)
void KeyframeView::slotRemoveKeyframe(int pos)
{
if (m_model->singleKeyframe()) {
// Don't allow zero keyframe
pCore->displayMessage(i18n("Cannot remove the last keyframe"), MessageType::InformationMessage, 500);
return;
}
if (pos < 0) {
pos = m_position;
}
......
......@@ -114,7 +114,8 @@ void QmlManager::setScene(Kdenlive::MonitorId id, MonitorSceneType type, QSize p
m_view->setSource(QUrl(QStringLiteral("qrc:/qml/kdenlivemonitorripple.qml")));
root = m_view->rootObject();
break;
default: m_view->setSource(
default:
m_view->setSource(
QUrl(id == Kdenlive::ClipMonitor || id == Kdenlive::DvdMonitor ? QStringLiteral("qrc:/qml/kdenliveclipmonitor.qml") : QStringLiteral("qrc:/qml/kdenlivemonitor.qml")));
root = m_view->rootObject();
root->setProperty("profile", QPoint(profile.width(), profile.height()));
......
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