Commit da95aa57 authored by Till Theato's avatar Till Theato
Browse files

- Insert/Remove space should not work on a locked track

- small QUI cleanups

svn path=/trunk/kdenlive/; revision=4482
parent 7ddafe65
......@@ -2703,6 +2703,11 @@ void CustomTrackView::slotRemoveSpace()
track = (int)(mapToScene(m_menuPosition).y() / m_tracksHeight);
}
if (m_document->isTrackLocked(m_document->tracksCount() - track - 1)) {
emit displayMessage(i18n("Cannot remove space in a locked track"), ErrorMessage);
return;
}
ClipItem *item = getClipItemAt(pos, track);
if (item) {
emit displayMessage(i18n("You must be in an empty space to remove space (time: %1, track: %2)", m_document->timecode().getTimecodeFromFrames(mapToScene(m_menuPosition).x()), track), ErrorMessage);
......@@ -2760,6 +2765,11 @@ void CustomTrackView::slotInsertSpace()
GenTime spaceDuration = d.selectedDuration();
track = d.selectedTrack();
if (m_document->isTrackLocked(m_document->tracksCount() - track - 1)) {
emit displayMessage(i18n("Cannot insert space in a locked track"), ErrorMessage);
return;
}
ClipItem *item = getClipItemAt(pos, track);
if (item) pos = item->startPos();
......
......@@ -104,7 +104,11 @@ public:
void setDocumentModified();
void setInPoint();
void setOutPoint();
/** @brief Prepares inserting space.
*
* Shows a dialog to configure length and track. */
void slotInsertSpace();
/** @brief Prepares removing space. */
void slotRemoveSpace();
void insertSpace(QList<ItemInfo> clipsToMove, QList<ItemInfo> transToMove, int track, const GenTime duration, const GenTime offset);
ClipItem *getActiveClipUnderCursor(bool allowOutsideCursor = false) const;
......
......@@ -494,6 +494,9 @@
<property name="text">
<string>N</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
......@@ -501,6 +504,9 @@
<property name="text">
<string>E</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="2">
......@@ -508,6 +514,9 @@
<property name="text">
<string>D</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="3">
......
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>EffectStack_UI</class>
<widget class="QWidget" name="EffectStack_UI" >
<property name="geometry" >
<widget class="QWidget" name="EffectStack_UI">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
......@@ -9,91 +10,103 @@
<height>344</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" >
<widget class="QSplitter" name="splitter" >
<property name="orientation" >
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="" >
<layout class="QGridLayout" name="gridLayout" >
<property name="horizontalSpacing" >
<widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="gridLayout">
<property name="horizontalSpacing">
<number>2</number>
</property>
<item row="0" column="0" colspan="7" >
<widget class="KListWidget" name="effectlist" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
<item row="0" column="0" colspan="7">
<widget class="KListWidget" name="effectlist">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="dragDropMode" >
<property name="dragDropMode">
<enum>QAbstractItemView::InternalMove</enum>
</property>
<property name="alternatingRowColors" >
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="movement" >
<property name="movement">
<enum>QListView::Free</enum>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QToolButton" name="buttonNew" >
<property name="text" >
<item row="1" column="0">
<widget class="QToolButton" name="buttonNew">
<property name="text">
<string>N</string>
</property>
<property name="popupMode" >
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QToolButton" name="buttonUp" >
<property name="enabled" >
<item row="1" column="1">
<widget class="QToolButton" name="buttonUp">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text" >
<property name="text">
<string>Up</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QToolButton" name="buttonDown" >
<property name="enabled" >
<item row="1" column="2">
<widget class="QToolButton" name="buttonDown">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text" >
<property name="text">
<string>Dw</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="3" >
<widget class="QToolButton" name="buttonReset" >
<property name="enabled" >
<item row="1" column="3">
<widget class="QToolButton" name="buttonReset">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text" >
<property name="text">
<string>R</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="4" >
<item row="1" column="4">
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0" >
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
......@@ -101,31 +114,37 @@
</property>
</spacer>
</item>
<item row="1" column="5" >
<widget class="QToolButton" name="buttonSave" >
<property name="enabled" >
<item row="1" column="5">
<widget class="QToolButton" name="buttonSave">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text" >
<property name="text">
<string>E</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="6" >
<widget class="QToolButton" name="buttonDel" >
<property name="enabled" >
<item row="1" column="6">
<widget class="QToolButton" name="buttonDel">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text" >
<property name="text">
<string>D</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QFrame" name="frame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
<widget class="QFrame" name="frame">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>1100</width>
<width>1102</width>
<height>679</height>
</rect>
</property>
......@@ -686,6 +686,9 @@
<property name="text">
<string>V</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
......@@ -693,6 +696,9 @@
<property name="text">
<string>V</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="3">
......
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