Skip to content

Commit

Permalink
PaintData: Save painted data to schema
Browse files Browse the repository at this point in the history
  • Loading branch information
astaric committed Jul 13, 2016
1 parent ac91ff4 commit 0e85a3b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Orange/widgets/data/owpaintdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,12 +774,14 @@ class OWPaintData(widget.OWWidget):
brushRadius = Setting(75)
density = Setting(7)

data = Setting(None, schema_only=True)

graph_name = "plot"

def __init__(self):
super().__init__()

self.data = self.input_data = None
self.input_data = None
self.input_classes = []
self.input_has_attr2 = True
self.current_tool = None
Expand All @@ -799,12 +801,14 @@ def __init__(self):
self.class_model.rowsInserted.connect(self._class_count_changed)
self.class_model.rowsRemoved.connect(self._class_count_changed)

self.data = np.zeros((0, 3))
if self.data is None:
self.data = np.zeros((0, 3))
self.colors = colorpalette.ColorPaletteGenerator(
len(colorpalette.DefaultRGBColors))
self.tools_cache = {}

self._init_ui()
self.commit()

def _init_ui(self):
namesBox = gui.vBox(self.controlArea, "Names")
Expand Down

0 comments on commit 0e85a3b

Please sign in to comment.