Blame dxf2gcode-0003-Fix-AttributeError-object-has-no-attribute-update.patch

ff3caad
From e9dbf63bb62b14d6501eb9853977b60b73a34261 Mon Sep 17 00:00:00 2001
ff3caad
From: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
ff3caad
Date: Wed, 6 Sep 2017 20:17:43 +0200
ff3caad
Subject: [dxf2gcode PATCH 3/3] Fix AttributeError - object has no attribute
ff3caad
 'update'
ff3caad
ff3caad
Fixes the following crash:
ff3caad
ff3caad
treehandling.py", line 1154, in actionOnSelectionChange
ff3caad
    g.window.canvas_scene.update()
ff3caad
AttributeError: 'NoneType' object has no attribute 'update'
ff3caad
Aborted (core dumped)
ff3caad
ff3caad
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
ff3caad
---
ff3caad
 source/gui/treehandling.py | 3 ++-
ff3caad
 1 file changed, 2 insertions(+), 1 deletion(-)
ff3caad
ff3caad
diff --git a/source/gui/treehandling.py b/source/gui/treehandling.py
ff3caad
index 51126ac..284c38b 100644
ff3caad
--- a/source/gui/treehandling.py
ff3caad
+++ b/source/gui/treehandling.py
ff3caad
@@ -1151,7 +1151,8 @@ class TreeHandler(QWidget):
ff3caad
         selectionEntity = self.ui.entitiesTreeView.selectionModel()
ff3caad
         selectionEntity.select(itemEntitySelection, QItemSelectionModel.Select | QItemSelectionModel.Rows)
ff3caad
 
ff3caad
-        g.window.canvas_scene.update()
ff3caad
+        if g.window.canvas_scene:
ff3caad
+            g.window.canvas_scene.update()
ff3caad
 
ff3caad
     def clearToolsParameters(self):
ff3caad
         """
ff3caad
-- 
ff3caad
2.9.5
ff3caad