Commits

Anonymous committed 036b19b

Files tab enabled only when more than one input data signal

Comments (0)

Files changed (1)

         self.fileLB = QListBox(box, "lb")
         self.connect(self.fileLB, SIGNAL("highlighted(int)"), self.fileSelectionChanged)    
         self.tabs.insertTab(self.filesTab, "Files")
+        self.tabs.setTabEnabled(self.filesTab, 0)
         dir = os.path.dirname(__file__) + "../icons/"
         hbox = QHBox(box)
         self.fileUp = self.createButton(hbox, self, 'File Up', icon = QPixmap(dir+'Dlg_send.png'), toggle = 0, callback=lambda i=-1: self.fileOrderChange(i))
             self.data.append(data)
             self.fileLB.insertItem(data.name)
 
+        if (self.data <> None and len(self.data) > 1):
+            self.tabs.setTabEnabled(self.filesTab, 1)
+        else:
+            self.tabs.setTabEnabled(self.filesTab, 0)
+            
         self.send('Classified Examples', None)
         self.send('Examples', None)
         self.setMetaCombos() # set the two combo widgets according to the data