]> git.sesse.net Git - kdenlive/commitdiff
Add option to allow the parameters to stay enabled when the effect is disabled.
authorTill Theato <root@ttill.de>
Sun, 12 Dec 2010 19:02:27 +0000 (19:02 +0000)
committerTill Theato <root@ttill.de>
Sun, 12 Dec 2010 19:02:27 +0000 (19:02 +0000)
Using the parameters with the effect disabled can be useful for example for colorpicking (white balance, bluescreen).

svn path=/trunk/kdenlive/; revision=5169

src/effectstackedit.cpp
src/kdenlivesettings.kcfg
src/widgets/configmisc_ui.ui

index 3d24f472e18bd1ce62b64af521a992fd90f157b3..fa8c20345ea8314e6d1e95891498a33a2852de8c 100644 (file)
@@ -163,7 +163,7 @@ void EffectStackEdit::updateParameter(const QString &name, const QString &value)
 
     if (name == "disable") {
         // if effect is disabled, disable parameters widget
-        setEnabled(value.toInt() == 0);
+        setEnabled(value.toInt() == 0 || !KdenliveSettings::disable_effect_parameters());
         if (KdenliveSettings::on_monitor_effects()) {
             // effect disabled, hide monitor scene if any
             QDomNodeList namenode = m_params.elementsByTagName("parameter");
@@ -175,7 +175,7 @@ void EffectStackEdit::updateParameter(const QString &name, const QString &value)
                     QString paramName = i18n(na.toElement().text().toUtf8().data());
                     paramName.append("geometry");
                     GeometryWidget *geometry = ((GeometryWidget*)m_valueItems.value(paramName));
-                    geometry->slotShowScene(value.toInt() == 0);
+                    geometry->slotShowScene(value.toInt() == 0 || !KdenliveSettings::disable_effect_parameters());
                 }
             }
         }
@@ -200,8 +200,8 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int pos, int in, in
     const int minFrame = e.attribute("start").toInt();
     const int maxFrame = e.attribute("end").toInt();
 
-    bool disabled = d.attribute("disable") == "1";
-    setEnabled(!disabled);
+    bool disable = d.attribute("disable") == "1" && KdenliveSettings::disable_effect_parameters();
+    setEnabled(!disable);
 
 
     for (int i = 0; i < namenode.count() ; i++) {
@@ -283,7 +283,7 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int pos, int in, in
             connect(pl, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
         } else if (type == "geometry") {
             if (KdenliveSettings::on_monitor_effects()) {
-                GeometryWidget *geometry = new GeometryWidget(m_monitor, m_timecode, pos, isEffect, disabled, this);
+                GeometryWidget *geometry = new GeometryWidget(m_monitor, m_timecode, pos, isEffect, disable, this);
                 // connect this before setupParam to make sure the monitor scene shows up at startup
                 connect(geometry, SIGNAL(checkMonitorPosition(int)), this, SIGNAL(checkMonitorPosition(int)));
                 connect(geometry, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
index ddcb1052484cd8dad9fd11d5e78453a57128a6dc..c0609add3b9642c5957c0a5af4f6237ebc82f7fd 100644 (file)
       <label>Use on-monitor effects.</label>
       <default>true</default>
     </entry>
+    
+    <entry name="disable_effect_parameters" type="Bool">
+      <label>Disable parameters when the effect is disabled.</label>
+      <default>true</default>
+    </entry>
   </group>
 
   <group name="project">
index 44d030bb0a64359cba7121f84cda294c384685aa..2e7c451d9c1122c8fad80fe02522f9b9b76a52d1 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>389</width>
-    <height>304</height>
+    <width>394</width>
+    <height>321</height>
    </rect>
   </property>
   <layout class="QGridLayout" name="gridLayout_4">
@@ -32,7 +32,7 @@
      </property>
     </widget>
    </item>
-   <item row="7" column="0" colspan="3">
+   <item row="8" column="0" colspan="3">
     <widget class="QGroupBox" name="groupBox">
      <property name="title">
       <string>Default Durations</string>
      </layout>
     </widget>
    </item>
-   <item row="9" column="0" colspan="3">
+   <item row="10" column="0" colspan="3">
     <spacer>
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </widget>
    </item>
-   <item row="8" column="0">
+   <item row="9" column="0">
     <widget class="QCheckBox" name="kcfg_autoimagesequence">
      <property name="text">
       <string>Automatically import image sequences</string>
      </property>
     </widget>
    </item>
+   <item row="7" column="0">
+    <widget class="QCheckBox" name="kcfg_disable_effect_parameters">
+     <property name="text">
+      <string>Disable parameters when the effect is disabled</string>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <customwidgets>