Changeset 10797:5d99ca1dfb9c in orange


Ignore:
Timestamp:
04/18/12 11:32:21 (2 years ago)
Author:
Matija Polajnar <matija.polajnar@…>
Branch:
default
Message:

Bugfix: OWNxExplorer should be nice and not change marking type in an unexpected kind of way ...

File:
1 edited

Legend:

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

    r10796 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) 
Note: See TracChangeset for help on using the changeset viewer.