From 7024df4ab200cb762e4a59e2be17d5cfd09bf859 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 23 Feb 2016 16:59:05 +0200 Subject: [PATCH] Using QGraphicsScene instead of VMainGraphicsScene caused a crash. (grafted from 32c7acbe1384dc3a8d284c938a8093d178095f87) --HG-- branch : develop --- ChangeLog.txt | 1 + src/app/valentina/mainwindowsnogui.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index b7e007eee..d13d31007 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -11,6 +11,7 @@ - [#385] Add 'Open Recent' option in Tape.exe, 'File' dropdown menu. # Version 0.4.3 +- Using QGraphicsScene instead of VMainGraphicsScene caused a crash. - Fixed bug disabling tool True darts. - Fixed wrong calculation tool True darts. - [#405] Fixed crash after deleting first pattern piece in the list. diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index 1e1f9067d..936e9e771 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -32,7 +32,7 @@ #include "../vobj/vobjpaintdevice.h" #include "../vdxf/vdxfpaintdevice.h" #include "dialogs/dialoglayoutsettings.h" - +#include "../vwidgets/vmaingraphicsscene.h" #include "../vlayout/vlayoutgenerator.h" #include "dialogs/dialoglayoutprogress.h" #include "dialogs/dialogsavelayout.h" @@ -437,7 +437,7 @@ void MainWindowsNoGUI::PrepareDetailsForLayout(const QHash *de //--------------------------------------------------------------------------------------------------------------------- void MainWindowsNoGUI::InitTempLayoutScene() { - tempSceneLayout = new QGraphicsScene(); + tempSceneLayout = new VMainGraphicsScene(); tempSceneLayout->setBackgroundBrush( QBrush(QColor(Qt::gray), Qt::SolidPattern) ); } @@ -503,7 +503,7 @@ void MainWindowsNoGUI::CreateScenes() { for (int i=0; isetBackgroundBrush(QBrush(QColor(Qt::gray), Qt::SolidPattern)); scene->addItem(shadows.at(i)); scene->addItem(papers.at(i));