Skip to content
Snippets Groups Projects
Commit c8f5fa0c authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Subscription peculiarities for MaterialModel explained.

parent f71ea403
No related branches found
No related tags found
No related merge requests found
...@@ -92,28 +92,17 @@ void AppSvc::this_unsubscribe(ProjectManager* projectManager) ...@@ -92,28 +92,17 @@ void AppSvc::this_unsubscribe(ProjectManager* projectManager)
void AppSvc::this_subscribe(MaterialModel* materialModel) void AppSvc::this_subscribe(MaterialModel* materialModel)
{ {
// MaterialModel created first will be subscribed
//! TODO FIXME PANIC Remove after MaterialSvc gone
if (m_materialModel) if (m_materialModel)
return; return;
if (m_materialModel != nullptr)
throw GUIHelpers::Error("AppSvc::projectManager() -> Error. Attempt to subscribe "
"MaterialModel twice.");
m_materialModel = materialModel; m_materialModel = materialModel;
} }
void AppSvc::this_unsubscribe(MaterialModel* materialModel) void AppSvc::this_unsubscribe(MaterialModel* materialModel)
{ {
//! TODO FIXME PANIC Remove after MaterialSvc gone
if (m_materialModel != materialModel) if (m_materialModel != materialModel)
return; return;
if (m_materialModel != materialModel)
throw GUIHelpers::Error("AppSvc::projectManager() -> Error. Attempt to unsubscribe "
"MaterialModel before it was subscribed.");
m_materialModel = nullptr; m_materialModel = nullptr;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment