提交 00030826 编写于 作者: HinGwenWoong's avatar HinGwenWoong

Fixed BUG: in kie mode, when change key and enter a new key will crash the software

上级 48b15203
...@@ -2212,6 +2212,12 @@ class MainWindow(QMainWindow): ...@@ -2212,6 +2212,12 @@ class MainWindow(QMainWindow):
self.key_previous_text = key_text self.key_previous_text = key_text
for shape in self.canvas.selectedShapes: for shape in self.canvas.selectedShapes:
shape.key_cls = key_text shape.key_cls = key_text
if not self.keyList.findItemsByLabel(key_text):
item = self.keyList.createItemFromLabel(key_text)
self.keyList.addItem(item)
rgb = self._get_rgb_by_label(key_text, self.kie_mode)
self.keyList.setItemLabel(item, key_text, rgb)
self._update_shape_color(shape) self._update_shape_color(shape)
def undoShapeEdit(self): def undoShapeEdit(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册