[vlmc-devel] [PATCH] Fix project closes without showing MsgBox when <empty> is clicked. Change project::isClean() to project::undostack::count()
yikei lu
luyikei.qmltu at gmail.com
Sat Mar 11 08:40:18 CET 2017
On Fri, Mar 10, 2017 at 9:39 PM, Hieu Pham <phamhuuquanghieu at gmail.com> wrote:
> ---
> src/Gui/MainWindow.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
> index 37e3507..0d1e6dd 100644
> --- a/src/Gui/MainWindow.cpp
> +++ b/src/Gui/MainWindow.cpp
> @@ -826,7 +826,7 @@ MainWindow::saveSettings()
> void
> MainWindow::closeEvent( QCloseEvent* e )
> {
> - if ( Core::instance()->project()->isClean() == false )
> + if ( Core::instance()->workflow()->undoStack()->count() > 0 )
This doesn't make sense since there is a case that the project isn't
changed but still will show the dialog which should be only shown when
it's changed. Also, the title is not very clear, so I couldn't really
understand the problem, Thanks for the patch though!
> {
> QMessageBox msgBox;
> msgBox.setText( QObject::tr( "The project has been modified." ) );
> --
> 2.9.3
>
> _______________________________________________
> Vlmc-devel mailing list
> Vlmc-devel at videolan.org
> https://mailman.videolan.org/listinfo/vlmc-devel
More information about the Vlmc-devel
mailing list