Skip to content
Snippets Groups Projects
Commit a560f67a authored by Kentaro Wada's avatar Kentaro Wada
Browse files

Keep previous label in QLineEdit for label

parent 207411d5
No related branches found
No related tags found
No related merge requests found
......@@ -681,8 +681,8 @@ class MainWindow(QMainWindow, WindowMixin):
position MUST be in global coordinates.
"""
text = ''
items = self.uniqLabelList.selectedItems()
text = None
if items:
text = items[0].text()
text = self.labelDialog.popUp(text)
......
......@@ -109,8 +109,8 @@ class LabelDialog(QDialog):
self.edit.setText(self.edit.text().trimmed())
def popUp(self, text=None, move=True):
if text is None:
text = ''
# if text is None, the previous label in self.edit is kept
if text is not None:
self.edit.setText(text)
self.edit.setSelection(0, len(text))
items = self.labelList.findItems(text, Qt.MatchFixedString)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment