diff engine/core/model/structures/instance.cpp @ 482:16c2b3ee59ce

* Merged the view performance branch back into trunk. fixes[ticket:419]
author helios2000@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 29 Apr 2010 13:51:45 +0000
parents 48c38e92e2bd
children 2de93d36ca6d
line wrap: on
line diff
--- a/engine/core/model/structures/instance.cpp	Wed Apr 28 21:33:11 2010 +0000
+++ b/engine/core/model/structures/instance.cpp	Thu Apr 29 13:51:45 2010 +0000
@@ -203,13 +203,23 @@
 	void Instance::initializeChanges() {
 		if (!m_activity) {
 			m_activity = new InstanceActivity(*this);
+			if(m_location.getLayer()) {
+				m_location.getLayer()->setInstanceActivityStatus(this, true);
+			}
 		}
 	}
+	
+	bool Instance::isActive() const {
+		return bool(m_activity);
+	}
 
 	void Instance::setLocation(const Location& loc) {
-		initializeChanges();
 		m_location = loc;
-		bindTimeProvider();
+		if(isActive()) {
+			refresh();
+		} else {
+			initializeChanges();
+		}
 	}
 
 	void Instance::setRotation(int rotation) {