diff --git a/engauge.pro.user.mmitchell b/engauge.pro.user.mmitchell index a2e79107..4ab0ef0a 100644 --- a/engauge.pro.user.mmitchell +++ b/engauge.pro.user.mmitchell @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/src/Transformation/Transformation.cpp b/src/Transformation/Transformation.cpp index 5a9c1d1c..6a8cab4b 100644 --- a/src/Transformation/Transformation.cpp +++ b/src/Transformation/Transformation.cpp @@ -437,6 +437,10 @@ void Transformation::update (bool fileIsLoaded, updateTransformFromMatrices (ftor.matrixScreen(), ftor.matrixGraph()); + } else { + + m_transformIsDefined = false; + } } } diff --git a/src/main/MainWindow.cpp b/src/main/MainWindow.cpp index 471cb22d..4955c8a6 100644 --- a/src/main/MainWindow.cpp +++ b/src/main/MainWindow.cpp @@ -1998,6 +1998,10 @@ void MainWindow::slotFileClose() m_transformation, selectedGraphCurve()); + // Transition to empty state so an inadvertent mouse press does not trigger, for example, + // the creation of an axis point on a non-existent GraphicsScene (=crash) + m_digitizeStateContext->requestImmediateStateTransition (DIGITIZE_STATE_EMPTY); + // Remove screen objects m_scene->resetOnLoad (); @@ -2920,7 +2924,7 @@ void MainWindow::updateControls () m_menuFileOpenRecent->setEnabled ((m_actionRecentFiles.count () > 0) && (m_actionRecentFiles.at(0)->isVisible ())); // Need at least one visible recent file entry - m_actionClose->setEnabled (!m_engaugeFile.isEmpty ()); + m_actionClose->setEnabled (!m_currentFile.isEmpty ()); m_actionSave->setEnabled (!m_engaugeFile.isEmpty ()); m_actionSaveAs->setEnabled (!m_currentFile.isEmpty ()); m_actionExport->setEnabled (!m_currentFile.isEmpty ());