comparison 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
comparison
equal deleted inserted replaced
198:4c5c62784211 199:1d789d688f59
47 } 47 }
48 emit unitDatabaseChanged(); 48 emit unitDatabaseChanged();
49 } 49 }
50 50
51 int 51 int
52 UnitDatabase::getUnitId(QString unit) 52 UnitDatabase::getUnitId(QString unit, bool registerNew)
53 { 53 {
54 if (m_units.find(unit) == m_units.end()) { 54 if (m_units.find(unit) == m_units.end()) {
55 registerUnit(unit); 55 if (registerNew) registerUnit(unit);
56 else return -1;
56 } 57 }
57 return m_units[unit]; 58 return m_units[unit];
58 } 59 }
59 60
60 QString 61 QString