mirror of
https://github.com/nqrduck/nqrduck-measurement.git
synced 2024-11-09 20:00:02 +00:00
Fixed bug with rejected apodization crashing the program.
This commit is contained in:
parent
775d6011f1
commit
f847bdabcb
2 changed files with 6 additions and 3 deletions
|
@ -215,8 +215,11 @@ class MeasurementController(ModuleController):
|
||||||
dialog = Apodization(measurement, parent=self.module.view)
|
dialog = Apodization(measurement, parent=self.module.view)
|
||||||
result = dialog.exec()
|
result = dialog.exec()
|
||||||
|
|
||||||
if result:
|
logger.debug("Dialog result: %s", result)
|
||||||
function = dialog.get_function()
|
if not result:
|
||||||
|
return
|
||||||
|
|
||||||
|
function = dialog.get_function()
|
||||||
|
|
||||||
logger.debug("Apodization function: %s", function)
|
logger.debug("Apodization function: %s", function)
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ class Apodization(DuckFormBuilder):
|
||||||
self.duration = (self.measurement.tdx[-1] - self.measurement.tdx[0]) * 1e-6
|
self.duration = (self.measurement.tdx[-1] - self.measurement.tdx[0]) * 1e-6
|
||||||
|
|
||||||
function_selection_field = DuckFormFunctionSelectionField(
|
function_selection_field = DuckFormFunctionSelectionField(
|
||||||
False, False, functions, self.duration, parent=parent, default_function=0
|
text=None, tooltip=None, functions=functions, duration=self.duration, parent=parent, default_function=0
|
||||||
)
|
)
|
||||||
|
|
||||||
self.add_field(function_selection_field)
|
self.add_field(function_selection_field)
|
||||||
|
|
Loading…
Reference in a new issue