diff base/UnitDatabase.cpp @ 199:1d789d688f59

* When adding a layer, make it the selected layer on that pane * More OSC support, including transforms
author Chris Cannam
date Fri, 10 Nov 2006 17:45:26 +0000
parents a08718723b20
children 417a1a08aadf
line wrap: on
line diff
--- a/base/UnitDatabase.cpp	Fri Nov 10 13:27:57 2006 +0000
+++ b/base/UnitDatabase.cpp	Fri Nov 10 17:45:26 2006 +0000
@@ -49,10 +49,11 @@
 }
 
 int
-UnitDatabase::getUnitId(QString unit)
+UnitDatabase::getUnitId(QString unit, bool registerNew)
 {
     if (m_units.find(unit) == m_units.end()) {
-        registerUnit(unit);
+        if (registerNew) registerUnit(unit);
+        else return -1;
     }
     return m_units[unit];
 }