Mercurial > fife-parpg
comparison 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 |
comparison
equal
deleted
inserted
replaced
481:1f37adc9a685 | 482:16c2b3ee59ce |
---|---|
201 } | 201 } |
202 | 202 |
203 void Instance::initializeChanges() { | 203 void Instance::initializeChanges() { |
204 if (!m_activity) { | 204 if (!m_activity) { |
205 m_activity = new InstanceActivity(*this); | 205 m_activity = new InstanceActivity(*this); |
206 } | 206 if(m_location.getLayer()) { |
207 m_location.getLayer()->setInstanceActivityStatus(this, true); | |
208 } | |
209 } | |
210 } | |
211 | |
212 bool Instance::isActive() const { | |
213 return bool(m_activity); | |
207 } | 214 } |
208 | 215 |
209 void Instance::setLocation(const Location& loc) { | 216 void Instance::setLocation(const Location& loc) { |
210 initializeChanges(); | |
211 m_location = loc; | 217 m_location = loc; |
212 bindTimeProvider(); | 218 if(isActive()) { |
219 refresh(); | |
220 } else { | |
221 initializeChanges(); | |
222 } | |
213 } | 223 } |
214 | 224 |
215 void Instance::setRotation(int rotation) { | 225 void Instance::setRotation(int rotation) { |
216 m_rotation = rotation; | 226 m_rotation = rotation; |
217 m_changeinfo |= ICHANGE_ROTATION; | 227 m_changeinfo |= ICHANGE_ROTATION; |