Skip to content

Conversation

@DrPaulSharp
Copy link
Contributor

Description

This PR restricts the functionality of the button known as "send to fitting" (now named "send to data explorer") to make sure it does not send data to perspectives, which has caused a number of bugs.

Fixes #3827

How Has This Been Tested?

Manually tested the procedure in #3827, the error does not occur. No data is sent to perspectives.

Review Checklist:

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

Documentation (check at least one)

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

@jellybean2004 jellybean2004 left a comment

Choose a reason for hiding this comment

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

Seems to fix the issue.

Also tested in the invariant refactor branch, seems to do the expected job without causing any issues.

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.

My comments might be outside the scope of this PR, since the issues I'm noting are already present in main, but, since you're already working in this section, maybe address them?

Comment on lines +34 to 35
custom_action.triggered.connect(self.sendToDataExplorer)
self.insertAction(self.actions()[-1], custom_action)
Copy link
Contributor

Choose a reason for hiding this comment

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

Following the procedure outlined in #3827, when sending the residual plot to the data explorer, two data objects are created in the data explorer. Somewhere in lines 34-37, two identical actions are created, and both are triggered when the icon is clicked.

Copy link
Contributor Author

@DrPaulSharp DrPaulSharp Dec 23, 2025

Choose a reason for hiding this comment

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

It looks like this comes from the loop in sendToDataExplorer

search_name = self.parent.data
for item in search_name:
    self.parent.manager.communicator.freezeDataNameSignal.emit(item.name)

In the parent data, the graph is listed twice. We may want to investigate further but given the nature of the bugs I'll leave it for this PR.


# Re-enable after 3 seconds
QtCore.QTimer.singleShot(3000, lambda: self._actions["fitting"].setEnabled(True))
QtCore.QTimer.singleShot(3000, lambda: self._actions["data_explorer"].setEnabled(True))
Copy link
Contributor

Choose a reason for hiding this comment

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

I never had a chance to review the original PR. What is this 3 second button disable accomplishing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm afraid I don't know. I can't see any discussion about it in the original PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed this code as is appears to serve no purpose.

@DrPaulSharp DrPaulSharp merged commit 431510e into main Dec 23, 2025
48 checks passed
@DrPaulSharp DrPaulSharp deleted the data_explorer_bugfix branch December 23, 2025 12:02
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.

"Send to Fitting" button causes errors in other perspectives

4 participants