Commit 1f6a99ef authored by Thery Sylvain's avatar Thery Sylvain

remove crash when closing SCHNApps

parent 1295cd62
......@@ -31,12 +31,6 @@ MapHandlerGen* Surface_Import_Plugin::importFromFile(const QString& fileName)
if(fi.exists())
{
MapHandlerGen* mhg = m_schnapps->addMap(fi.baseName(), 2);
std::cout << "IMPORT PLUGIN 2" << std::endl;
std::cout << "PTR="<< GenericMap::s_instances<< std::endl;
for (auto inst : *GenericMap::s_instances)
std::cout << inst<< std::endl;
if(mhg)
{
MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(mhg);
......
......@@ -24,9 +24,13 @@ int main(int argc, char* argv[])
// get a smart pointer to the __main__ module of the Python interpreter
PythonQtObjectPtr pythonContext = PythonQt::self()->getMainModule();
PythonQtScriptingConsole pythonConsole(NULL, pythonContext);
CGoGN::SCHNApps::SCHNApps schnapps(app.applicationDirPath(), pythonContext, pythonConsole);
// PythonQtScriptingConsole pythonConsole(NULL, pythonContext);
// CGoGN::SCHNApps::SCHNApps schnapps(app.applicationDirPath(), pythonContext, pythonConsole);
PythonQtScriptingConsole* pythonConsole = new PythonQtScriptingConsole(NULL, pythonContext);
CGoGN::SCHNApps::SCHNApps schnapps(app.applicationDirPath(), pythonContext, *pythonConsole);
schnapps.show();
pythonContext.addObject("schnapps", &schnapps);
......
......@@ -108,7 +108,8 @@ void View::unlinkPlugin(PluginInteraction* plugin)
{
plugin->unlinkView(this);
emit(pluginUnlinked(plugin));
updateGL();
// removed because of crash when application close
// updateGL();
}
}
......@@ -159,7 +160,8 @@ void View::unlinkMap(MapHandlerGen* map)
emit(mapUnlinked(map));
updateCurrentCameraBB();
updateGL();
// removed because of crash when application close
// updateGL();
disconnect(map->getFrame(), SIGNAL(modified()), this, SLOT(updateGL()));
disconnect(map, SIGNAL(selectedCellsChanged(CellSelectorGen*)), this, SLOT(updateGL()));
......
......@@ -1088,9 +1088,9 @@ void GLSLShader::enableVertexAttribs(unsigned int stride, unsigned int begin) co
this->bind();
for (std::vector<Utils::GLSLShader::VAStr>::const_iterator it = m_va_vbo_binding.begin(); it != m_va_vbo_binding.end(); ++it)
{
assert(((it->vbo_ptr->nbElts()==0) || (it->vbo_ptr->dataSize()!=0) ) || !"dataSize of VBO is 0 ! could not draw");
glBindBuffer(GL_ARRAY_BUFFER, it->vbo_ptr->id());
glEnableVertexAttribArray(it->va_id);
assert((it->vbo_ptr->dataSize()!=0) || !"dataSize of VBO is 0 ! could not draw");
glVertexAttribPointer(it->va_id, it->vbo_ptr->dataSize(), GL_FLOAT, false, stride, (const GLvoid*)((unsigned long)(begin)));
}
// this->unbind();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment