Keep interpolation results when sources are hidden and allow individual removal
This commit is contained in:
@@ -112,6 +112,16 @@ class ProcessingQtTests(unittest.TestCase):
|
||||
self.panel._finished(self.panel._job.signature, None, "test error")
|
||||
self.assertEqual((previous,), self.panel.curves)
|
||||
|
||||
def test_hidden_source_preserves_result_but_changed_samples_invalidate_it(self):
|
||||
self.calculate()
|
||||
curve = self.panel.curve
|
||||
hidden = replace(self.snapshot, series=(replace(self.snapshot.series[0], visible=False),))
|
||||
self.panel.set_snapshot(hidden)
|
||||
self.assertEqual((curve,), self.panel.curves)
|
||||
self.assertTrue(self.panel.export_button.isEnabled())
|
||||
self.panel.set_snapshot(replace(hidden, series=(replace(hidden.series[0], points=((0, 2), (1, 3))),)))
|
||||
self.assertEqual((), self.panel.curves)
|
||||
|
||||
def test_source_units_and_blocking_invalidate_result(self):
|
||||
for changed in (replace(self.snapshot, axis=Axis("Frequency", "Hz")),
|
||||
replace(self.snapshot, source="new file"),
|
||||
|
||||
Reference in New Issue
Block a user