[dss-commits] digitalSTROM Server branch, master, updated. ebec34a0cd3521bedf0a4f82e7dd0a761baa09e6
git version control
dss-commits at forum.digitalstrom.org
Sat Jan 16 13:54:29 CET 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "digitalSTROM Server".
The branch, master has been updated
via ebec34a0cd3521bedf0a4f82e7dd0a761baa09e6 (commit)
via 8cbe7315d7c59d9593dcda84840b62bd6b71d27b (commit)
via 415087b00af1dc64282c6a633d7dc235c396ef98 (commit)
from 088da73eedfec14a07561bdbfc02431988926cc5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ebec34a0cd3521bedf0a4f82e7dd0a761baa09e6
Author: Patrick Stählin <pstaehlin at futurelab.ch>
Date: Sat Jan 16 13:52:43 2010 +0100
Remove devices from zones too if removed from apt
commit 8cbe7315d7c59d9593dcda84840b62bd6b71d27b
Author: Patrick Stählin <pstaehlin at futurelab.ch>
Date: Sat Jan 16 13:32:56 2010 +0100
Removed wrong comment
commit 415087b00af1dc64282c6a633d7dc235c396ef98
Author: Patrick Stählin <pstaehlin at futurelab.ch>
Date: Sat Jan 16 13:32:19 2010 +0100
Removed unused device vector on group
-----------------------------------------------------------------------
Changes:
diff --git a/core/model/apartment.cpp b/core/model/apartment.cpp
index 36094d5..ccc8588 100644
--- a/core/model/apartment.cpp
+++ b/core/model/apartment.cpp
@@ -283,11 +283,17 @@ namespace dss {
}
} // removeZone
- void Apartment::removeDevice(dsid_t _device) {
+ void Apartment::removeDevice(dsid_t _device) {
for(std::vector<Device*>::iterator ipDevice = m_Devices.begin(), e = m_Devices.end();
ipDevice != e; ++ipDevice) {
Device* pDevice = *ipDevice;
if(pDevice->getDSID() == _device) {
+ int zoneID = pDevice->getZoneID();
+ DeviceReference devRef = DeviceReference(*pDevice, this);
+ if(zoneID != 0) {
+ getZone(zoneID).removeDevice(devRef);
+ }
+ getZone(0).removeDevice(devRef);
m_Devices.erase(ipDevice);
delete pDevice;
return;
diff --git a/core/model/group.cpp b/core/model/group.cpp
index ee2cf25..8410da6 100644
--- a/core/model/group.cpp
+++ b/core/model/group.cpp
@@ -51,7 +51,6 @@ namespace dss {
} // getDevices
Group& Group::operator=(const Group& _other) {
- m_Devices = _other.m_Devices;
m_GroupID = _other.m_GroupID;
m_ZoneID = _other.m_ZoneID;
return *this;
diff --git a/core/model/group.h b/core/model/group.h
index 8fa13f6..ce54b42 100644
--- a/core/model/group.h
+++ b/core/model/group.h
@@ -33,7 +33,6 @@ namespace dss {
class Group : public DeviceContainer,
public AddressableModelItem {
protected:
- DeviceVector m_Devices;
int m_ZoneID;
int m_GroupID;
int m_LastCalledScene;
@@ -59,8 +58,6 @@ namespace dss {
/** @copydoc Device::setLastCalledScene */
void setLastCalledScene(const int _value) { m_LastCalledScene = _value; }
- /** Compares a group to another group.
- * Two groups are considered equal if they belong to the same group and zone. */
Group& operator=(const Group& _other);
}; // Group
hooks/post-receive
--
digitalSTROM Server
More information about the dss-commits
mailing list