Skip to content

Conversation

@backmari
Copy link
Contributor

@backmari backmari commented Nov 14, 2025

Description

Small changes:

  • keep the tabbed plot widget inside the main window (was floating independently)
  • minimize the tabbed plot widget if the user closes the window

Minimizing rather than closing is a workaround for the tabbed plot widget getting into a weird state and not showing any plots after having been closed once. I think it is still something to discuss what the correct behavior should be. There is currently not a way to completely delete a plot from the tabbed plot widget, like how you can close and delete the existing floating plot windows. We may also want to keep the plot widget around permanently, like e.g. the data explorer.

Fixes # (issue/issues)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Review Checklist:

[if using the editor, use [x] in place of [ ] to check a box]

Documentation (check at least one)

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)
    • Wheels installer (GH artifact) has been tested (installed and worked)

Licensing (untick if necessary)

  • The introduced changes comply with SasView license (BSD 3-Clause)

Copy link
Contributor

@krzywon krzywon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. Haven't tested the functionality.

@gonzalezma
Copy link
Contributor

gonzalezma commented Nov 17, 2025

I am not sure what it's the status of this, so sorry if I miss something. Testing the functionality on a Windows 11 laptop:

  1. The PlotVi window remains now inside the SasView main canvas.
  2. And after closing it is minimised.

As these are the 2 things that this PR is supposed to do, I would say that it can be merged.
But I have some questions/remarks about the general behaviour:

  1. The initial window is placed on top of the canvas and has a very small size, so I did not see immediately in my small laptop screen (I had to scroll up).
  2. The size is so small that one only sees the title bar. Only when one moves the window it resizes to a more useful size, but even then I had to resize it larger to see the plots inside.
  3. When I resize it, the plots inside changed! Instead of showing the data and the model, the graph on the left showed me twice the data and the graph on the right twice the residuals (according to the legend).
  4. Why do we want to keep the window (minimised) when we close it instead of really closing it?

@backmari
Copy link
Contributor Author

@gonzalezma Thank you very much for testing!

  1. and 2. I didn't notice this before, but now that I tested I saw the same! I will try to fix this issue.
  2. This behavior was existing before, so I will plan to address this separately in another PR.
  3. Good question! One reason to minimize rather than close is that I imagine the "plot viewer" as a widget that should remain available at all times (or at least after the first plot has been plotted), just like the data explorer. This is something to discuss though.
    The second (maybe more important) reason was that when testing, I noticed that the tabbed plot widget would get in a weird state and not show any plots after it had been closed once. Minimizing was a workaround for that. I will update the PR description to mention that.

@backmari backmari marked this pull request as draft December 16, 2025 14:14
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 this pull request may close these issues.

4 participants