Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Open Display" action does not work as expected from within "Template/Instance" widget #2127

Closed
Amadrath opened this issue Feb 8, 2022 · 3 comments · Fixed by #2128
Closed

Comments

@Amadrath
Copy link

Amadrath commented Feb 8, 2022

Hi everyone,

if I call an "Open Display"-action from within an instance, it fails because the widgets uses the directory of the Phoebus-Installation as reference for the relative path, instead of the directory of the display file. The same action works fine, if used from a display.
I assume, that the Template/Instance widget does not inherit the root directory from the display, it is part of. Is that intended? Is there a way, to resolve that?

@kasemir
Copy link
Collaborator

kasemir commented Feb 8, 2022

The template/instance widget is the most recently added widget, relatively new, and this is likely a bug in there that needs to be fixed.
Can you provide a simple example display that demonstrates the issue, that'll help in looking into this in more detail.

@Amadrath
Copy link
Author

Amadrath commented Feb 8, 2022

Here you go:
DEMO.zip
It's three files, one display with the Template/instance widget, one display, that is called by the instance widget and one display, that is to be opened. Simply right-click on the text-widgets, and choose the "Open Plot"-action. It works fine on the non-instanced widget, but generates an error on the instanced ones.

kasemir pushed a commit that referenced this issue Feb 8, 2022
.. to allow resolution of relative path names

Fixes #2127
@kasemir
Copy link
Collaborator

kasemir commented Feb 8, 2022

Thanks for the demo!
For what it's worth, I would use a small action button next to the text update instead of adding an action to the text update.
An action button is pretty obvious. Having to right click on something is not.
But either way it clearly shows the issue and I think it'll soon be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants