Commit 7996e147 authored by Sylvain Thery's avatar Sylvain Thery

stop recording python properly at exit

parent a76fbe55
......@@ -1136,6 +1136,10 @@ void SCHNApps::appendPyRecording()
void SCHNApps::closeEvent(QCloseEvent *event)
{
DEBUG_EMIT("schnappsClosing");
if (m_pyRecording != NULL) // WRITE & CLOSE
{
pyRecording();
}
emit(schnappsClosing());
QMainWindow::closeEvent(event);
}
......
......@@ -541,7 +541,7 @@ void View::keyPressEvent(QKeyEvent* event)
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Ok);
if (msgBox.exec() == QMessageBox::Ok)
exit(0);
m_schnapps->close();
}
else
QGLViewer::keyPressEvent(event);
......
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