Skip to content

Commit bbe9833

Browse files
authored
fix: increase range fore the "Absolute Bounds" mode in the GridPlanWidget (#402)
* increase range _BoundsWidget spinboxes * fix typing MDAWidget
1 parent 68f8dee commit bbe9833

2 files changed

Lines changed: 21 additions & 7 deletions

File tree

src/pymmcore_widgets/mda/_core_mda.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from contextlib import suppress
44
from pathlib import Path
5-
from typing import cast
5+
from typing import TYPE_CHECKING, cast
66

77
from fonticon_mdi6 import MDI6
88
from pymmcore_plus import CMMCorePlus, Keyword
@@ -35,6 +35,11 @@
3535
from ._core_z import CoreConnectedZPlanWidget
3636
from ._save_widget import SaveGroupBox
3737

38+
if TYPE_CHECKING:
39+
from collections.abc import Sequence
40+
41+
from pymmcore_plus.mda import SupportsFrameReady
42+
3843

3944
class _CoreConnectedPositionTable(CoreConnectedPositionTable):
4045
def __init__(
@@ -264,15 +269,24 @@ def prepare_mda(self) -> bool | str | Path | None:
264269
else:
265270
return None
266271

267-
def execute_mda(self, output: Path | str | object | None) -> None:
272+
def execute_mda(
273+
self,
274+
output: (
275+
Path
276+
| str
277+
| SupportsFrameReady
278+
| Sequence[Path | str | SupportsFrameReady]
279+
| None
280+
),
281+
) -> None:
268282
"""Execute the MDA experiment corresponding to the current value."""
269283
sequence = self.value()
270284
# run the MDA experiment asynchronously
271285
self._mmc.run_mda(sequence, output=output)
272286

273287
def run_mda(self) -> None:
274288
save_path = self.prepare_mda()
275-
if save_path is False:
289+
if isinstance(save_path, bool):
276290
return
277291
self.execute_mda(save_path)
278292

src/pymmcore_widgets/useq_widgets/_grid.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,16 +347,16 @@ def __init__(self) -> None:
347347
super().__init__()
348348

349349
self.left = QDoubleSpinBox()
350-
self.left.setRange(-10000, 10000)
350+
self.left.setRange(-10000000, 10000000)
351351
self.left.setDecimals(3)
352352
self.top = QDoubleSpinBox()
353-
self.top.setRange(-10000, 10000)
353+
self.top.setRange(-10000000, 10000000)
354354
self.top.setDecimals(3)
355355
self.right = QDoubleSpinBox()
356-
self.right.setRange(-10000, 10000)
356+
self.right.setRange(-10000000, 10000000)
357357
self.right.setDecimals(3)
358358
self.bottom = QDoubleSpinBox()
359-
self.bottom.setRange(-10000, 10000)
359+
self.bottom.setRange(-10000000, 10000000)
360360
self.bottom.setDecimals(3)
361361

362362
form = QFormLayout(self)

0 commit comments

Comments
 (0)