mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
add label when there are not env keys to set
This commit is contained in:
parent
2af6e7140e
commit
9893903a57
1 changed files with 16 additions and 3 deletions
|
|
@ -37,12 +37,10 @@ class LocalEnvironmentsWidgets(QtWidgets.QWidget):
|
|||
content_widget = QtWidgets.QWidget(self)
|
||||
content_layout = QtWidgets.QGridLayout(content_widget)
|
||||
content_layout.setContentsMargins(0, 0, 0, 0)
|
||||
content_layout.setColumnStretch(0, 0)
|
||||
content_layout.setColumnStretch(1, 1)
|
||||
white_list_entity = (
|
||||
self.system_settings_entity["general"]["local_env_white_list"]
|
||||
)
|
||||
|
||||
row = -1
|
||||
for row, item in enumerate(white_list_entity):
|
||||
key = item.value
|
||||
label_widget = QtWidgets.QLabel(key, self)
|
||||
|
|
@ -54,6 +52,21 @@ class LocalEnvironmentsWidgets(QtWidgets.QWidget):
|
|||
|
||||
self._widgets_by_env_key[key] = input_widget
|
||||
|
||||
if row < 0:
|
||||
label_widget = QtWidgets.QLabel(
|
||||
(
|
||||
"Your studio does not allow to change"
|
||||
" Environment variables locally."
|
||||
),
|
||||
self
|
||||
)
|
||||
content_layout.addWidget(label_widget, 0, 0)
|
||||
content_layout.setColumnStretch(0, 1)
|
||||
|
||||
else:
|
||||
content_layout.setColumnStretch(0, 0)
|
||||
content_layout.setColumnStretch(1, 1)
|
||||
|
||||
self._layout.addWidget(content_widget, 1)
|
||||
|
||||
self._content_layout = content_layout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue