diff options
Diffstat (limited to 'src/Slit.hh')
-rw-r--r-- | src/Slit.hh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Slit.hh b/src/Slit.hh index 77ce6f5..d6ba08f 100644 --- a/src/Slit.hh +++ b/src/Slit.hh | |||
@@ -180,12 +180,18 @@ private: | |||
180 | class SlitClientsRes: public FbTk::Resource_base, public SlitClients { | 180 | class SlitClientsRes: public FbTk::Resource_base, public SlitClients { |
181 | public: | 181 | public: |
182 | SlitClientsRes(FbTk::ResourceManager_base &rm, const std::string &name) | 182 | SlitClientsRes(FbTk::ResourceManager_base &rm, const std::string &name) |
183 | : FbTk::Resource_base(name, name), m_rm(rm) { | 183 | : FbTk::Resource_base(name, name), m_rm(&rm) { |
184 | m_rm.addResource(*this); | 184 | m_rm->addResource(*this); |
185 | } | 185 | } |
186 | 186 | ||
187 | ~SlitClientsRes() { | 187 | ~SlitClientsRes() { |
188 | m_rm.removeResource(*this); | 188 | m_rm->removeResource(*this); |
189 | } | ||
190 | |||
191 | virtual void setResourceManager(FbTk::ResourceManager_base &rm) { | ||
192 | m_rm->removeResource(*this); | ||
193 | m_rm = &rm; | ||
194 | m_rm->addResource(*this); | ||
189 | } | 195 | } |
190 | 196 | ||
191 | virtual void setDefaultValue() {} | 197 | virtual void setDefaultValue() {} |
@@ -195,7 +201,7 @@ private: | |||
195 | virtual void pushToLua(lua::state &l) const; | 201 | virtual void pushToLua(lua::state &l) const; |
196 | 202 | ||
197 | private: | 203 | private: |
198 | FbTk::ResourceManager_base &m_rm; | 204 | FbTk::ResourceManager_base *m_rm; |
199 | }; | 205 | }; |
200 | 206 | ||
201 | SlitClientsRes m_client_list; | 207 | SlitClientsRes m_client_list; |