Changeset 11799:5a69a29551ee in orange


Ignore:
Timestamp:
12/09/13 11:36:15 (4 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Bug fix. Check for a None value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Visualize/OWScatterPlot.py

    r11784 r11799  
    256256        self.closeContext() 
    257257        sameDomain = self.data and data and data.domain.checksum() == self.data.domain.checksum() # preserve attribute choice if the domain is the same 
    258         if not hasattr(data, "name"): 
     258        if data is not None and not hasattr(data, "name"): 
    259259            data.name = "data" 
    260260        self.data = data 
     
    309309            return 
    310310        (selected, unselected) = self.graph.getSelectionsAsExampleTables([self.attrX, self.attrY]) 
    311         if selected: 
    312             if not hasattr(selected, "name"): 
    313                 selected.name = self.data.name + " (selected)" 
    314             if not hasattr(unselected, "name"): 
    315                 selected.name = self.data.name + " (other)" 
     311 
     312        if selected is not None and not hasattr(selected, "name"): 
     313            selected.name = self.data.name + " (selected)" 
     314        if unselected is not None and not hasattr(unselected, "name"): 
     315            selected.name = self.data.name + " (other)" 
     316 
    316317        self.send("Selected Data", selected) 
    317318        self.send("Other Data", unselected) 
Note: See TracChangeset for help on using the changeset viewer.