Skip to content

Commit

Permalink
qtvcp : add panel instance reference, fix check for preference
Browse files Browse the repository at this point in the history
  • Loading branch information
c-morley committed Aug 7, 2022
1 parent fc7fa95 commit 737d495
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/python/qtvcp/qt_makegui.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def apply_styles(self, fname=None):

# Check for Preference file specified qss
if fname is None:
if self.PREFS_:
if not self.PREFS_ is None:
path = self.PREFS_.getpref('style_QSS_Path', 'DEFAULT', str, 'BOOK_KEEPING')
if path.lower() == 'none':
return
Expand Down
5 changes: 3 additions & 2 deletions lib/python/qtvcp/qt_makepins.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self, halcomp, path, window, debug):
xmlname = path.XML
self.window = window
self.window['PREFS_'] = None
self.window['panel_'] = self
self._screenOptions = None
self._geo_string = ''

Expand Down Expand Up @@ -121,7 +122,7 @@ def __init__(self, halcomp, path, window, debug):
# Search all hal-ifed widgets for _hal_cleanup functions and call them
# used for such things as preference recording current settings
def shutdown(self):
if self.window['PREFS_']:
if not self.window['PREFS_'] is None:
self.record_preference_geometry()
LOG.debug("Calling widget's _hal_cleanup functions.")
for widget in self.window.getRegisteredHalWidgetList():
Expand Down Expand Up @@ -153,7 +154,7 @@ def record_preference_geometry(self):
# if there is a screen option widget and we haven't set INI switch geometry
# then call screenoptions function to set preference geometry
def set_preference_geometry(self):
if self.window['PREFS_']:
if not self.window['PREFS_'] is None:
self.geometry_parsing()
else:
LOG.info('No preference file - cannot set preference geometry.')
Expand Down

0 comments on commit 737d495

Please sign in to comment.