diff --git a/cura-dead-object.patch b/cura-dead-object.patch new file mode 100644 index 0000000..33a0a30 --- /dev/null +++ b/cura-dead-object.patch @@ -0,0 +1,55 @@ +From 6a6d7d86266c832e3c7df43976218ca2e220f501 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Mon, 6 Jul 2015 13:53:05 +0200 +Subject: [PATCH] Prevent PyDeadObjectError + +On wxPython 3, PyDeadObjectError exception was risen +when Cura was started for the first time. + +This ensures it won't happen. + +Related bug: https://bugzilla.redhat.com/show_bug.cgi?id=1230281 +--- + Cura/gui/app.py | 3 +++ + Cura/gui/splashScreen.py | 3 ++- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/Cura/gui/app.py b/Cura/gui/app.py +index 38c79fe..ebbb1e5 100644 +--- a/Cura/gui/app.py ++++ b/Cura/gui/app.py +@@ -134,6 +134,7 @@ def afterSplashCallback(self): + self.loadFiles = [exampleFile] + if self.splash is not None: + self.splash.Show(False) ++ self.splash = None + configWizard.ConfigWizard() + + if profile.getPreference('check_for_updates') == 'True': +@@ -141,6 +142,7 @@ def afterSplashCallback(self): + if newVersion is not None: + if self.splash is not None: + self.splash.Show(False) ++ self.splash = None + if wx.MessageBox(_("A new version of Cura is available, would you like to download?"), _("New version available"), wx.YES_NO | wx.ICON_INFORMATION) == wx.YES: + webbrowser.open(newVersion) + return +@@ -149,6 +151,7 @@ def afterSplashCallback(self): + self.mainWindow = mainWindow.mainWindow() + if self.splash is not None: + self.splash.Show(False) ++ self.splash = None + self.SetTopWindow(self.mainWindow) + self.mainWindow.Show() + self.mainWindow.OnDropFiles(self.loadFiles) +diff --git a/Cura/gui/splashScreen.py b/Cura/gui/splashScreen.py +index e2a2613..06e2bd7 100644 +--- a/Cura/gui/splashScreen.py ++++ b/Cura/gui/splashScreen.py +@@ -13,4 +13,5 @@ def __init__(self, callback): + + def DoCallback(self): + self.callback() +- self.Destroy() ++ if self: ++ self.Destroy() diff --git a/cura.spec b/cura.spec index a97e847..1a308f3 100644 --- a/cura.spec +++ b/cura.spec @@ -1,6 +1,6 @@ Name: cura Version: 15.02.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: 3D printer control software # Code is AGPLv3 @@ -35,6 +35,10 @@ Patch3: %{name}-no-firmware.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1217961 Patch4: %{name}-xdg-open.patch +# https://github.com/daid/Cura/pull/1305 +# https://bugzilla.redhat.com/show_bug.cgi?id=1230281 +Patch5: %{name}-dead-object.patch + BuildArch: noarch BuildRequires: python2-devel BuildRequires: dos2unix @@ -64,6 +68,7 @@ settings and send this G-Code to the 3D printer for printing. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # invalid locale not able to compile rm resources/locale/zh -rf @@ -115,6 +120,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2} %{_bindir}/%{name} %changelog +* Mon Jul 06 2015 Miro Hrončok - 15.02.1-3 +- Patch for #1230281 + * Mon Jul 06 2015 Miro Hrončok - 15.02.1-2 - Require latest CuraEngine