Show empty required object-list fields with warning icon, remove unused IGdefaultRemoved slot#780
Conversation
…ed IGdefaultRemoved slot
|
|
||
| // field is currently set to an invalid value | ||
| idx = 0; | ||
| connect(combo, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::currentTextChanged), this, &InspectorGadget::IGdefaultRemoved); |
There was a problem hiding this comment.
The IGdefaultRemoved slot was only connected in this case and it was being called directly from InspectorGadget::layoutComboBox at line 808 combo->setCurrentIndex(idx). This means that the slot was called before the user had a chance to do anything, so it was effectively useless.
|
@macumber A before/after screenshot or gif would go a long way in helping to see the changes when reviewing. |
|
before 4bfb712: Model with zero thermal zones: One thermal zone: it defaults to "Thermal Zone 1" |
|
I see one (very) minor issue. I add one or more thermal zones. Initially it's empty: it shows the warning icon. I can go select "Thermal Zone1". But until I switch tabs, I can reselect the "Empty" slot though. If I select any zones, switch tabs and go back, then the Empty slot is no longer available. I'm fine with the current way, but if you know off the top of your head how to prevent re-selecting the empty slot, I'll take it. |
|
I saw the same issue and figured that behavior was probably better than whatever bugs I would introduce trying to clean up the combo box list when the user picked a new option. I heard you on the gifs for PRs, I'll try to be better :-) |




Fixes #778