chiark / gitweb /
Get the toplevel parent to get the main window, easier and safer
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Fri, 31 Jul 2015 18:17:17 +0000 (14:17 -0400)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Fri, 31 Jul 2015 18:17:17 +0000 (14:17 -0400)
Cura/gui/sceneView.py

index 1a101ccdb624246f64086670a60ab79dd65f264c..586936b78e69892453c61be6c1e47ec91f18f311 100644 (file)
@@ -159,7 +159,7 @@ class SceneView(openglGui.glGuiPanel):
                self.loadScene(filenames)
 
        def loadFiles(self, filenames):
-               mainWindow = self.GetParent().GetParent().GetParent()
+               mainWindow = self.GetTopLevelParent()
                # only one GCODE file can be active
                # so if single gcode file, process this
                # otherwise ignore all gcode files