SideFX Houdini customization package
git clone https://git.lucas.co/hou-control.git
settings: no restart notice until a restart is owed
The idle text under the tabs explained the row glyph; the glyph's
tooltip already does, so the notice and its button now stay hidden
until a restart-only setting has been saved with a new value.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
python3.13libs/hc/hcsettings.py | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/python3.13libs/hc/hcsettings.py b/python3.13libs/hc/hcsettings.py
index 42e701d..171a4d6 100644
--- a/python3.13libs/hc/hcsettings.py
+++ b/python3.13libs/hc/hcsettings.py
@@ -305,11 +305,12 @@ class HCSettingsPanel(QWidget):
buttons = QDialogButtonBox(QDialogButtonBox.Save)
buttons.accepted.connect(self._save)
- # The notice under the tabs: idle it explains the marker, once a
- # restart-only setting has been saved with a new value it names the
- # settings and offers the restart.
+ # The notice under the tabs: hidden until a restart-only setting has
+ # been saved with a new value, then it names the settings and offers
+ # the restart.
self._restart_banner = QLabel()
self._restart_banner.setWordWrap(True)
+ self._restart_banner.setStyleSheet("color: #e0a040;")
self._restart_button = QPushButton("Restart Houdini")
self._restart_button.clicked.connect(self._restart)
notice = QHBoxLayout()
@@ -392,16 +393,14 @@ class HCSettingsPanel(QWidget):
else:
mark.setText(self.RESTART_MARK)
mark.setStyleSheet("color: #808080;")
+ # Nothing under the tabs until a restart is actually owed; the row
+ # glyph and its tooltip carry the explanation the rest of the time.
if pending:
names = ", ".join(hcschema.label_for(path[-1], hcschema.lookup(path))
for path in pending)
self._restart_banner.setText(
f"{self.RESTART_MARK} Restart Houdini to apply: {names}")
- self._restart_banner.setStyleSheet("color: #e0a040;")
- else:
- self._restart_banner.setText(
- f"Settings marked {self.RESTART_MARK} take effect on next start.")
- self._restart_banner.setStyleSheet("color: #808080;")
+ self._restart_banner.setVisible(bool(pending))
self._restart_button.setVisible(bool(pending))
def _restart(self):