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

[FIX] HyperSpectra: fix changing data with active line trace #764

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions orangecontrib/spectroscopy/tests/test_owhyper.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,18 @@ def test_select_click(self):
out = self.get_output("Selection")
np.testing.assert_almost_equal(out.metas, [[53.2443, 30.6984]], decimal=3)

def test_select_line_change_file(self):
self.send_signal("Data", self.whitelight)
wait_for_image(self.widget)
# select whole image row
self.widget.imageplot.select_line(QPointF(50, 30.6), QPointF(55, 30.6))
out = self.get_output("Selection")
self.assertEqual(len(out), 200)
self.send_signal("Data", self.iris)
wait_for_image(self.widget)
out = self.get_output("Selection")
self.assertIsNone(out, None)

def test_select_click_multiple_groups(self):
data = self.whitelight
self.send_signal("Data", data)
Expand Down
1 change: 1 addition & 0 deletions orangecontrib/spectroscopy/widgets/owhyper.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ def set_data(self, data):
else:
self.data = None
self.data_ids = {}
self.selection_distances = None

def refresh_img_selection(self):
if self.lsx is None or self.lsy is None:
Expand Down
Loading