Skip to content

Commit ec49583

Browse files
committed
[models] reformat axis value header
This brings the header format in line with the syntax that will be used to specify range restrictions
1 parent bf16385 commit ec49583

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/slice/models.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def __init__(self, *args):
196196
"Axis 4",
197197
"Axis 5",
198198
]
199-
self._h_header = ["(Min, Max) [Default]", "Edit Values"]
199+
self._h_header = ["Min : Max [Default]", "Edit Values"]
200200

201201
def data(self, index, role):
202202
if role in (Qt.DisplayRole, Qt.EditRole):
@@ -211,6 +211,9 @@ def headerData(self, section, orientation, role):
211211
elif orientation == Qt.Horizontal and role == Qt.DisplayRole:
212212
return self._h_header[section]
213213

214+
if orientation == Qt.Vertical and role == Qt.TextAlignmentRole:
215+
return Qt.AlignCenter
216+
214217
# add full registered axis strings in tooltips
215218
if role == Qt.ToolTipRole:
216219
if orientation == Qt.Vertical:
@@ -254,7 +257,7 @@ def load_font(self, font_model):
254257
axis.maxValue,
255258
]
256259
new_data.append(
257-
[f"({axis.minValue}, {axis.maxValue}) [{axis.defaultValue}]", ""]
260+
[f"{axis.minValue} : {axis.maxValue} [{axis.defaultValue}]", ""]
258261
)
259262
# use the axisID to locate the axis name in the name table
260263
# if it does not exist, the getName method returns None

0 commit comments

Comments
 (0)