Commits

iorodeo  committed 302bdb9

Fixed bug in GUI - channel group boxes were not unchecked on device close.

  • Participants
  • Parent commits 0eb5652

Comments (0)

Files changed (1)

File host/current_controller/current_controller/current_controller_app.py

                 self.serialPort_LineEdit.setEnabled(True)
                 self.openClose_PushButton.setText('Open')
         else:
+            self.serialPort_LineEdit.setEnabled(True)
+            self.openClose_PushButton.setText('Open')
+            self.setChanGroupBoxChecked(False)
+            self.setChanGroupBoxEnabled(False)
             self.dev.close()
             self.dev = None 
-            self.serialPort_LineEdit.setEnabled(True)
-            self.openClose_PushButton.setText('Open')
-            self.setChanGroupBoxEnabled(False)
-            self.setChanGroupBoxEnabled(False)
 
     def serialPort_Callback(self):
         """
         """
         Enable/Disables the all of the channel group boxes
         """
-        # Disable channel groups
         for chan in self.channelList:
             widgetName = 'channel{0}_GroupBox'.format(chan.upper())
-            groubox = getattr(self,widgetName)
-            groubox.setEnabled(value)
+            groupbox = getattr(self,widgetName)
+            groupbox.setEnabled(value)
+
+    def setChanGroupBoxChecked(self,value):
+        """
+        Check/unchech channel group boxes        
+        """
+        for chan in self.channelList:
+            widgetName = 'channel{0}_GroupBox'.format(chan.upper())
+            groupbox = getattr(self,widgetName)
+            groupbox.setChecked(value)
+
+            
 
 def channelWrapper(f,chan):
     """