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