@@ -274,18 +274,18 @@ def _add_controls_axis(self):
274274 labelWidth = 50 , orientation = Qt .Horizontal , sendSelectedValue = True ,
275275 valueType = str , contentsLength = 14
276276 )
277- box = gui .vBox (self .controlArea , True )
277+ self . attr_box = gui .vBox (self .controlArea , True )
278278 dmod = DomainModel
279279 self .xy_model = DomainModel (dmod .MIXED , valid_types = ContinuousVariable )
280280 self .cb_attr_x = gui .comboBox (
281- box , self , "attr_x" , label = "Axis x:" ,
281+ self . attr_box , self , "attr_x" , label = "Axis x:" ,
282282 callback = self .set_attr_from_combo ,
283283 model = self .xy_model , ** common_options )
284284 self .cb_attr_y = gui .comboBox (
285- box , self , "attr_y" , label = "Axis y:" ,
285+ self . attr_box , self , "attr_y" , label = "Axis y:" ,
286286 callback = self .set_attr_from_combo ,
287287 model = self .xy_model , ** common_options )
288- vizrank_box = gui .hBox (box )
288+ vizrank_box = gui .hBox (self . attr_box )
289289 self .vizrank , self .vizrank_button = ScatterPlotVizRank .add_vizrank (
290290 vizrank_box , self , "Find Informative Projections" , self .set_attr )
291291
@@ -318,6 +318,7 @@ def _vizrank_color_change(self):
318318
319319 def set_data (self , data ):
320320 super ().set_data (data )
321+ self ._vizrank_color_change ()
321322
322323 def findvar (name , iterable ):
323324 """Find a Orange.data.Variable in `iterable` by name"""
@@ -437,17 +438,19 @@ def set_subset_data(self, subset_data):
437438
438439 # called when all signals are received, so the graph is updated only once
439440 def handleNewSignals (self ):
441+ self .attr_box .setEnabled (True )
442+ self .vizrank .setEnabled (True )
440443 if self .attribute_selection_list and self .data is not None and \
441444 self .data .domain is not None and \
442445 all (attr in self .data .domain for attr
443446 in self .attribute_selection_list ):
444447 self .attr_x , self .attr_y = self .attribute_selection_list [:2 ]
445- self .attribute_selection_list = None
448+ self .attr_box .setEnabled (False )
449+ self .vizrank .setEnabled (False )
446450 super ().handleNewSignals ()
447451 if self ._domain_invalidated :
448452 self .graph .update_axes ()
449453 self ._domain_invalidated = False
450- self ._vizrank_color_change ()
451454
452455 @Inputs .features
453456 def set_shown_attributes (self , attributes ):
@@ -516,5 +519,6 @@ def migrate_context(cls, context, version):
516519
517520
518521if __name__ == "__main__" : # pragma: no cover
519- data = Table ("iris" )
520- WidgetPreview (OWScatterPlot ).run (set_data = data , set_subset_data = data [:30 ])
522+ table = Table ("iris" )
523+ WidgetPreview (OWScatterPlot ).run (set_data = table ,
524+ set_subset_data = table [:30 ])
0 commit comments