Skip to content

Commit f113c2b

Browse files
committed
Return None for empty width string
1 parent da54315 commit f113c2b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/mslice/models/cut/cut.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def width(self, width_str):
143143
except ValueError:
144144
raise ValueError("Invalid width")
145145
elif width_str == "":
146-
self._width = round(self.end - self.start, 8)
146+
self._width = self.end - self.start
147147
else:
148148
self._width = None
149149

src/mslice/widgets/cut/cut.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ def get_integration_end(self):
146146
return str(self.lneCutIntegrationEnd.text())
147147

148148
def get_integration_width(self):
149+
if self.lneCutIntegrationWidth.text() == "":
150+
return None
149151
return str(self.lneCutIntegrationWidth.text())
150152

151153
def get_intensity_start(self):

0 commit comments

Comments
 (0)