pcdshub / lightpath

LCLS Lightpath Module
https://pcdshub.github.io/lightpath
Other
4 stars 9 forks source link

Lightpath opens extra PyDM Main Window #112

Closed ZLLentz closed 4 years ago

ZLLentz commented 4 years ago

Expected Behavior

Should not spawn an empty main window

Current Behavior

Extra main window loaded image

Possible Solution

Read PyDM docs and update lightpath code

Steps to Reproduce (for bugs)

  1. Open lightpath UI

Context

If it annoys me, it will annoy users

Your Environment

Latest

hhslepicka commented 4 years ago

The culprit is the launcher script at /bin/lightpath. At this line here it creates a PyDMApplication (https://github.com/pcdshub/lightpath/blob/master/bin/lightpath#L27) and since probably this code is old and predates the work to no longer depend on the PyDMApplication & PyDMMainWindow it does this.

Simply using the use_main_window=False option at the PyDMApplication constructor should address this issue. More info here: https://github.com/slaclab/pydm/blob/master/pydm/application.py#L77

ZLLentz commented 4 years ago

Thank you Hugo! I figured it was something like that. This launcher is very very old. I'll make the appropriate change.