diff widgets/PropertyBox.cpp @ 376:e1a9e478b7f2

* juggle some files around in order to free audioio, base, and system libraries from dependency on QtGui
author Chris Cannam
date Wed, 12 Mar 2008 17:42:56 +0000
parents 67834ac56f2b
children 0bcb449d15f4
line wrap: on
line diff
--- a/widgets/PropertyBox.cpp	Wed Mar 12 14:40:18 2008 +0000
+++ b/widgets/PropertyBox.cpp	Wed Mar 12 17:42:56 2008 +0000
@@ -19,8 +19,8 @@
 #include "base/PropertyContainer.h"
 #include "base/PlayParameters.h"
 #include "layer/Layer.h"
+#include "layer/ColourDatabase.h"
 #include "base/UnitDatabase.h"
-#include "base/ColourDatabase.h"
 #include "base/RangeMapper.h"
 
 #include "plugin/RealTimePluginFactory.h"
@@ -607,12 +607,14 @@
     
     PropertyContainer::PropertyType type = m_container->getPropertyType(name);
 
+    Command *c = 0;
+
     if (type == PropertyContainer::UnitsProperty) {
 
         NotifyingComboBox *cb = dynamic_cast<NotifyingComboBox *>(obj);
         if (cb) {
             QString unit = cb->currentText();
-            m_container->setPropertyWithCommand
+            c = m_container->getSetPropertyCommand
                 (name, UnitDatabase::getInstance()->getUnitId(unit));
         }
 
@@ -625,12 +627,14 @@
                 return;
             }
         }
-        m_container->setPropertyWithCommand(name, value);
+        c = m_container->getSetPropertyCommand(name, value);
 
     } else if (type != PropertyContainer::InvalidProperty) {
 
-	m_container->setPropertyWithCommand(name, value);
+	c = m_container->getSetPropertyCommand(name, value);
     }
+
+    if (c) CommandHistory::getInstance()->addCommand(c, true, true);
     
     updateContextHelp(obj);
 }