-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change the "selected_ROI" value sent to the display #43
Conversation
cf. #25 |
So, let's take advantage of this pull request to review the changes implemented in the previous one (#42). Here are some comments (to be updated):
|
Small coding remark, here is your current version of the def renameROI(self):
""" renames the currently selected ROI"""
selected_idx = self.selectRoiComboBox.currentIndex()
selected_ROI_name = self.selectRoiComboBox.currentText()
new_name, ok = QInputDialog.getText(
self, "Rename ROI", "Choose a new name for " + selected_ROI_name + " :")
self.display.updateROI(roi_name=selected_ROI_name,name=new_name)
self.selectRoiComboBox.setItemText(selected_idx, new_name) I would rather use this way of generating the message string (which is consistent to the rest of the code): msg = "Choose a new name for %s : " % selected_ROI_name |
Ok I'll change this, but the |
I would not say it is "highly deprecated" (source)
I'm fine with moving to the new style. Maybe we could use the short version: msg = f"Choose a new name for {selected_ROI_name} : " I suggest that in this pull request we stick to the old format. If we decide to move to the new format, we'll do that in a dedicated cleanup/xxx branch |
Yes I am currently working on what's you're suggesting in #43 (comment) and I already moved to the f-string formatting. EDIT: the |
The final version should be working -> it needs to be tested by anyone before merging. Most of the painful bugs came from the signals generated by GUI elements modifications while executing some stuff (I had to freeze it manually). It seems to be quite a challenge to keep control of all the events occurring in the gui actually... |
update: the selected_roi variable was not affected by the combobox