Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Unsupervised/OWNxExplorer.py

    r10734 r10797  
    229229            OWGUI.appendRadioButton(ribg, self, "hubs", "Neighbours of selected", callback=self.set_mark_mode) 
    230230            ib = OWGUI.indentedBox(ribg, orientation=0) 
    231             self.ctrlMarkDistance = OWGUI.spin(ib, self, "markDistance", 0, 100, 1, label="Distance ", callback=(lambda h=2: self.set_mark_mode(h))) 
     231            self.ctrlMarkDistance = OWGUI.spin(ib, self, "markDistance", 0, 100, 1, label="Distance ", 
     232                callback=(lambda: self.set_mark_mode(2 if not self.hubs==3 else 3))) 
    232233            #self.ctrlMarkFreeze = OWGUI.button(ib, self, "&Freeze", value="graph.freezeNeighbours", toggleButton = True) 
    233234            OWGUI.widgetLabel(ribg, "Mark nodes with ...") 
    234235            OWGUI.appendRadioButton(ribg, self, "hubs", "at least N connections", callback=self.set_mark_mode) 
    235236            OWGUI.appendRadioButton(ribg, self, "hubs", "at most N connections", callback=self.set_mark_mode) 
    236             self.ctrlMarkNConnections = OWGUI.spin(OWGUI.indentedBox(ribg), self, "markNConnections", 0, 1000000, 1, label="N ", callback=(lambda h=4: self.set_mark_mode(h))) 
     237            self.ctrlMarkNConnections = OWGUI.spin(OWGUI.indentedBox(ribg), self, "markNConnections", 0, 1000000, 1, label="N ", 
     238                callback=(lambda: self.set_mark_mode(4 if not self.hubs==5 else 5))) 
    237239            OWGUI.appendRadioButton(ribg, self, "hubs", "more connections than any neighbour", callback=self.set_mark_mode) 
    238240            OWGUI.appendRadioButton(ribg, self, "hubs", "more connections than avg neighbour", callback=self.set_mark_mode) 
     
    554556 
    555557        def send_data(self): 
     558            selected_nodes = self.networkCanvas.selected_nodes() 
     559            self.nSelected = len(selected_nodes) 
     560 
    556561            if len(self.signalManager.getLinks(self, None, \ 
    557562                "Selected Items", None)) > 0 or \ 
     
    562567 
    563568                # signal connected 
    564                 selected_nodes = self.networkCanvas.selected_nodes() 
    565569                graph = self.graph_base.subgraph(selected_nodes) 
    566570 
Note: See TracChangeset for help on using the changeset viewer.