Skip to content

Commit

Permalink
Merge pull request #1425 from BlazZupan/paintdata-empty-dataset
Browse files Browse the repository at this point in the history
[FIX] PaintData: Send None instead of empty table when the plot is empty
  • Loading branch information
kernc authored Jul 7, 2016
2 parents 2230b7c + fd541cb commit 2f5975f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Orange/widgets/data/owpaintdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,9 @@ def invalidate(self):
self.commit()

def commit(self):
if len(self.data) == 0:
self.send("Data", None)
return
if self.hasAttr2:
X, Y = self.data[:, :2], self.data[:, 2]
attrs = (Orange.data.ContinuousVariable(self.attr1),
Expand Down

0 comments on commit 2f5975f

Please sign in to comment.