-
Notifications
You must be signed in to change notification settings - Fork 21
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
GUI is disabled when opened programmatically #112
Comments
thanks. agreed. let's take another close look at |
My proposed fix will also involve new signals being added. Which also opens the (maybe thorny) question of where do those signals go. see micro-manager/mmCoreAndDevices#149 |
Relevant signals being added to core here: micro-manager/mmCoreAndDevices#163 |
Closing since this is not happening anymore. Still have an unrelated issue already mentioned in #255. from pymmcore_plus import CMMCorePlus
from pathlib import Path
import napari
from useq import MDASequence
core = CMMCorePlus.instance()
core.loadSystemConfiguration(str(Path(__file__).parent / "tests" / "test_config.cfg"))
v = napari.Viewer()
dw, main_window = v.window.add_plugin_dock_widget("napari-micromanager")
sequence = MDASequence(
channels=["Cy5", {"config": "FITC", "exposure": 50}],
time_plan={"interval": 2, "loops": 5},
z_plan={"range": 4, "step": 0.5},
axis_order="tpcz",
stage_positions=[(222, 1, 1), (111, 0, 0)],
)
main_window._show_dock_widget("MDA")
mda = v.window._dock_widgets.get("MDA").widget()
mda.set_state(sequence)
napari.run() |
Due to the
_set_enabled
behavior if you modify thelaunch-dev
script to have the config be loaded before creating the widget (a reasonable thing to do one when scripting)then the entire GUI is still disabled.
I think the solution is to remove the top level concept of enabled/disabled and push that down to a per widget basis. They should check for the relevant loaded devices at creation and then listen the appropriate signals to (de)activate themselves as approriate.
The text was updated successfully, but these errors were encountered: