- cleaned up internal data when plugin is turned off

This commit is contained in:
Guido Ranzuglia 2016-11-21 12:01:41 +01:00
parent 0050b87353
commit 0dcce43ebf
2 changed files with 10 additions and 1 deletions

View File

@ -304,3 +304,12 @@ bool SampleEditPlugin::StartEdit(MeshModel &/*m*/, GLArea * gla, MLSceneGLShared
connect(this, SIGNAL(suspendEditToggle()), gla, SLOT(suspendEditToggle()));
return true;
}
void SampleEditPlugin::EndEdit(MeshModel &/*m*/, GLArea * /*parent*/, MLSceneGLSharedDataContext* /*cont*/)
{
haveToPick = false;
pickmode = 0; // 0 face 1 vertex
curFacePtr = 0;
curVertPtr = 0;
pIndex = 0;
}

View File

@ -39,7 +39,7 @@ public:
static const QString Info();
bool StartEdit(MeshModel &/*m*/, GLArea * /*parent*/, MLSceneGLSharedDataContext* /*cont*/);
void EndEdit(MeshModel &/*m*/, GLArea * /*parent*/, MLSceneGLSharedDataContext* /*cont*/){};
void EndEdit(MeshModel &/*m*/, GLArea * /*parent*/, MLSceneGLSharedDataContext* /*cont*/);
void Decorate(MeshModel &/*m*/, GLArea * /*parent*/, QPainter *p);
void Decorate (MeshModel &/*m*/, GLArea * ){};
void mousePressEvent(QMouseEvent *, MeshModel &, GLArea * ) {};