Skip to content

Commit

Permalink
Shifter components: expose joint name description in settings. Core u…
Browse files Browse the repository at this point in the history
…pdate padding filter #102
  • Loading branch information
miquelcampos committed Mar 22, 2022
1 parent ef00fad commit d964d1b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions release/scripts/mgear/shifter/component/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,7 @@ def __init__(self, parent=None):
self.setWindowTitle("joint NameDescriptor")
self.setMinimumWidth(200)
self.descriptors_lineEdit = []
self.descriptors_label = []
self.descriptors_layout = []
self.main_layout = QtWidgets.QVBoxLayout(self)

Expand All @@ -1029,6 +1030,7 @@ def create_descriptor(self, descriptor, d_custom):
button = QtWidgets.QPushButton("Reset")

self.descriptors_lineEdit.append(lineedit)
self.descriptors_label.append(label)

# layout
layout = QtWidgets.QHBoxLayout(self)
Expand Down Expand Up @@ -1064,8 +1066,12 @@ def create_layouts(self):

def set_descriptors_attr(self):
descriptors_attr_val = []
for d in self.descriptors_lineEdit:
d_name = string.normalize_with_padding(d.text())
for e, d in enumerate(self.descriptors_lineEdit):
# we use the label to determine if the name should filer "#":
if "#" in self.descriptors_label[e].text():
d_name = string.normalize_with_padding(d.text())
else:
d_name = string.normalize2(d.text())
d.setText(d_name)
descriptors_attr_val.append(d_name)
self.root.attr(
Expand Down

0 comments on commit d964d1b

Please sign in to comment.