change color when label has changed
This commit is contained in:
parent
821ffae6b9
commit
7be0a01af8
@ -607,6 +607,7 @@ class MainWindow(QMainWindow, WindowMixin):
|
|||||||
text = self.labelDialog.popUp(item.text())
|
text = self.labelDialog.popUp(item.text())
|
||||||
if text is not None:
|
if text is not None:
|
||||||
item.setText(text)
|
item.setText(text)
|
||||||
|
item.setBackground(generateColorByText(text))
|
||||||
self.setDirty()
|
self.setDirty()
|
||||||
|
|
||||||
# Tzutalin 20160906 : Add file list and dock to move faster
|
# Tzutalin 20160906 : Add file list and dock to move faster
|
||||||
@ -752,6 +753,7 @@ class MainWindow(QMainWindow, WindowMixin):
|
|||||||
label = item.text()
|
label = item.text()
|
||||||
if label != shape.label:
|
if label != shape.label:
|
||||||
shape.label = item.text()
|
shape.label = item.text()
|
||||||
|
shape.line_color = generateColorByText(shape.label)
|
||||||
self.setDirty()
|
self.setDirty()
|
||||||
else: # User probably changed item visibility
|
else: # User probably changed item visibility
|
||||||
self.canvas.setShapeVisible(shape, item.checkState() == Qt.Checked)
|
self.canvas.setShapeVisible(shape, item.checkState() == Qt.Checked)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user