From: daid303 Date: Mon, 12 Nov 2012 08:58:40 +0000 (+0100) Subject: Fixed the print window does not open bug!. X-Git-Tag: 13.03~197 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=d84570b907dca50deafdb029296e5b7ff1e863a2;p=cura.git Fixed the print window does not open bug!. --- diff --git a/Cura/gui/printWindow.py b/Cura/gui/printWindow.py index 9047e9e3..646992d5 100644 --- a/Cura/gui/printWindow.py +++ b/Cura/gui/printWindow.py @@ -103,6 +103,8 @@ class printWindow(wx.Frame): self.cam = None if webcam.hasWebcamSupport(): self.cam = webcam.webcam() + if not self.cam.hasCamera(): + self.cam = None #self.SetIcon(icon.getMainIcon()) @@ -245,7 +247,7 @@ class printWindow(wx.Frame): nb.AddPage(self.termPanel, 'Term') - if self.cam != None and self.cam.hasCamera(): + if self.cam != None: self.camPage = wx.Panel(nb) sizer = wx.GridBagSizer(2, 2) self.camPage.SetSizer(sizer) @@ -343,7 +345,7 @@ class printWindow(wx.Frame): self.bedTemperatureSelect.Enable(self.machineCom != None and self.machineCom.isOperational()) self.directControlPanel.Enable(self.machineCom != None and self.machineCom.isOperational() and not self.machineCom.isPrinting()) self.machineLogButton.Show(self.machineCom != None and self.machineCom.isClosedOrError()) - if self.cam: + if self.cam != None: for button in self.cam.buttons: button.Enable(self.machineCom == None or not self.machineCom.isPrinting())