Skip to content

Commit 3d108af

Browse files
committed
Simplify ColorMapEditor code
1 parent 8a63a10 commit 3d108af

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

plotpy/widgets/colormap/editor.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,7 @@ def new_tab(self, index: int, handle_pos: float) -> None:
219219
index: index of the insertion/appending.
220220
handle_pos: relative value to set in the tab (new handle current position)
221221
"""
222-
title = ""
223-
224-
dw = DataSetEditGroupBox(QW.QLabel(title, self), ColorPickDataSet)
222+
dw = DataSetEditGroupBox("", ColorPickDataSet)
225223
dw.dataset.set_position(handle_pos)
226224

227225
hex_color = self.colormap_widget.get_hex_color(index)
@@ -231,10 +229,10 @@ def new_tab(self, index: int, handle_pos: float) -> None:
231229

232230
if index == self.tabs.count():
233231
self.datasets.append(dw)
234-
self.tabs.addTab(dw, title)
232+
self.tabs.addTab(dw, "")
235233
else:
236234
self.datasets.insert(index, dw)
237-
self.tabs.insertTab(index, dw, title)
235+
self.tabs.insertTab(index, dw, "")
238236
dw.updateGeometry()
239237

240238
self.tabs.setCurrentIndex(index)

0 commit comments

Comments
 (0)