Changeset 9392:cee3226ec917 in orange


Ignore:
Timestamp:
12/20/11 20:39:57 (2 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
8ba0ea282bd38c5a4662f8bed5ecd661ac7f293a
Message:

Remember previous selection behaviour.

File:
1 edited

Legend:

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

    r9383 r9392  
    4747        "mdsFromCurrentPos", "labelsOnMarkedOnly", "tabIndex",  
    4848        "networkCanvas.trim_label_words", "opt_from_curr", "networkCanvas.explore_distances", 
    49         "networkCanvas.show_component_distances", "fontWeight", "networkCanvas.state"]  
     49        "networkCanvas.show_component_distances", "fontWeight", "networkCanvas.state", 
     50        "networkCanvas.selection_behavior"]  
    5051         
    5152        def __init__(self, parent=None, signalManager=None, name = 'Net Explorer',  
     
    260261            self.toolbar = OWGUI.widgetBox(self.controlArea, orientation='horizontal') 
    261262            prevstate = self.networkCanvas.state 
     263            prevselbeh = self.networkCanvas.selection_behavior 
    262264            G = self.networkCanvas.gui 
    263265            self.zoomSelectToolbar = G.zoom_select_toolbar(self.toolbar, nomargin=True, buttons =  
     
    273275            self.zoomSelectToolbar.buttons[G.SendSelection].clicked.connect(self.send_data) 
    274276            self.zoomSelectToolbar.buttons[G.SendSelection].hide() 
    275             #NOTHING = 0 
    276             #ZOOMING = 1 
    277             #SELECT = 2 
    278             #SELECT_POLYGON = 3 
    279             #PANNING = 4 
    280             #SELECT_RECTANGLE = SELECT 
    281             #SELECT_RIGHTCLICK = SELECT 
    282             state_buttons = {0: 11, 1: 11, 2: 13, 3: 13, 4: 12} 
    283             self.zoomSelectToolbar.buttons[state_buttons[prevstate]].click() 
     277            self.zoomSelectToolbar.select_selection_behaviour(prevselbeh) 
     278            self.zoomSelectToolbar.select_state(prevstate) 
     279             
    284280             
    285281            self.reportButton = OWGUI.button(self.toolbar, self, "&Report", self.reportAndFinish, debuggingEnabled=0) 
Note: See TracChangeset for help on using the changeset viewer.