From f3bd47f347b67ed74b76b9b5961fc91f41567a72 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 5 Aug 2019 20:29:41 +0300 Subject: [PATCH] Add color getter-setter for source wrapper --- graphs/wrapper.py | 13 ++++++++++++- gui/builtinViewColumns/color.py | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/graphs/wrapper.py b/graphs/wrapper.py index 04947f3df..50717d701 100644 --- a/graphs/wrapper.py +++ b/graphs/wrapper.py @@ -94,7 +94,18 @@ class BaseWrapper: class SourceWrapper(BaseWrapper): - pass + + def __init__(self, item): + super().__init__(item) + self._color = None + + @property + def color(self): + return self._color + + @color.setter + def color(self, value): + self._color = value class TargetWrapper(BaseWrapper): diff --git a/gui/builtinViewColumns/color.py b/gui/builtinViewColumns/color.py index e7f112363..1869d2395 100644 --- a/gui/builtinViewColumns/color.py +++ b/gui/builtinViewColumns/color.py @@ -42,7 +42,7 @@ class LineColor(ViewColumn): def getToolTip(self, stuff): if isinstance(stuff, SourceWrapper): - return '' + return 'Change line color' return ''