mirror of
https://github.com/m-labs/artiq.git
synced 2025-01-31 04:40:20 +08:00
experiments: fix color dictionary handling
Signed-off-by: Florian Agbuya <fa@m-labs.ph>
This commit is contained in:
parent
415895413c
commit
7619dff08d
@ -357,7 +357,7 @@ class _ExperimentDock(QtWidgets.QMdiSubWindow):
|
||||
|
||||
def apply_colors(self):
|
||||
colors = self.manager.get_colors(self.expurl)
|
||||
if colors is None:
|
||||
if not colors:
|
||||
palette = QtWidgets.QApplication.palette()
|
||||
colors = {
|
||||
"window": palette.color(QtGui.QPalette.ColorRole.Window).name(),
|
||||
@ -563,7 +563,7 @@ class ExperimentManager:
|
||||
self.colors[expurl][key] = value
|
||||
|
||||
def get_colors(self, expurl):
|
||||
return self.colors.get(expurl)
|
||||
return self.colors.get(expurl, {})
|
||||
|
||||
def reset_colors(self, expurl):
|
||||
if expurl in self.colors:
|
||||
|
Loading…
Reference in New Issue
Block a user