[Kdenlive-devel] [PATCH kdenlive 2/2] Show subclips by default

Mikko Rapeli mikko.rapeli at iki.fi
Wed Sep 28 19:40:28 UTC 2011


Clips in project list with subclips have no visual indicator that
they have subclips so expand them by default.

Better fix would be to add a clear visual indicator to clips with subclips,
for example clips in a folder already have this.
---
 src/subprojectitem.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/subprojectitem.cpp b/src/subprojectitem.cpp
index 9c8ad1e..d397804 100644
--- a/src/subprojectitem.cpp
+++ b/src/subprojectitem.cpp
@@ -40,6 +40,11 @@ SubProjectItem::SubProjectItem(QTreeWidgetItem * parent, int in, int out, QStrin
     setText(1, description);
     GenTime duration = GenTime(out - in, KdenliveSettings::project_fps());
     if (duration != GenTime()) setData(0, DurationRole, Timecode::getEasyTimecode(duration, KdenliveSettings::project_fps()));
+
+    // Expand and show all subclips by default instead of hiding them.
+    if (parent && !parent->isExpanded())
+        parent->setExpanded(true);
+
     //setFlags(Qt::NoItemFlags);
     //kDebug() << "Constructed with clipId: " << m_clipId;
 }
-- 
1.7.5.4





More information about the Kdenlive mailing list