[dss-commits] r8858 - dss/trunk/core
dss-commits at forum.digitalstrom.org
dss-commits at forum.digitalstrom.org
Thu Oct 22 16:11:09 CEST 2009
Author: pstaehlin
Date: 2009-10-22 16:11:09 +0200 (Thu, 22 Oct 2009)
New Revision: 8858
Modified:
dss/trunk/core/model.cpp
Log:
Don't remove device from zone 0 when it's plugged in.
This caused devices that were plugged in for the first time (since
a restart of the dSS *and* the dSS) to not appear in zone 0.
Modified: dss/trunk/core/model.cpp
===================================================================
--- dss/trunk/core/model.cpp 2009-10-22 14:11:07 UTC (rev 8857)
+++ dss/trunk/core/model.cpp 2009-10-22 14:11:09 UTC (rev 8858)
@@ -1580,11 +1580,13 @@
}
// remove from old zone
- try {
- Zone& oldZone = getZone(dev.getZoneID());
- oldZone.removeDevice(devRef);
- // TODO: check if the zone is empty on the modulator and remove it in that case
- } catch(std::runtime_error&) {
+ if(dev.getZoneID() != 0) {
+ try {
+ Zone& oldZone = getZone(dev.getZoneID());
+ oldZone.removeDevice(devRef);
+ // TODO: check if the zone is empty on the modulator and remove it in that case
+ } catch(std::runtime_error&) {
+ }
}
// update device
More information about the dss-commits
mailing list