[vlmc-devel] [PATCH] Fixed vlmc trying to save projects without assigned project file.
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Mon Mar 14 21:24:38 CET 2016
On 03/13/2016 12:58 PM, Paweł Wegner wrote:
> ---
> src/Gui/MainWindow.cpp | 3 ++-
> src/Project/Project.h | 2 +-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
> index fc88afd..8f404e9 100644
> --- a/src/Gui/MainWindow.cpp
> +++ b/src/Gui/MainWindow.cpp
> @@ -778,7 +778,8 @@ MainWindow::saveSettings()
> void
> MainWindow::closeEvent( QCloseEvent* e )
> {
> - if ( Core::getInstance()->project()->isClean() == false )
> + Project *project = Core::getInstance()->project();
> + if ( project->isClean() == false && project->hasProjectFile() )
This should probably offer the user a chance to save as if the project
has no file yet, rather than exiting silently
> {
> QMessageBox msgBox;
> msgBox.setText( QObject::tr( "The project has been modified." ) );
> diff --git a/src/Project/Project.h b/src/Project/Project.h
> index 17062d3..98debfa 100644
> --- a/src/Project/Project.h
> +++ b/src/Project/Project.h
> @@ -118,7 +118,7 @@ class Project : public QObject
> void backupProjectLoaded();
> void outdatedBackupFileFound();
>
> -private:
> + private:
> bool loadWorkflow( const QDomDocument& root );
Please split this out
>
> private:
>
Regards,
--
Hugo Beauzée-Luyssen
www.beauzee.fr
More information about the Vlmc-devel
mailing list