Skip to content

Commit

Permalink
Allow User Preferences to disable connecting markers to active collec…
Browse files Browse the repository at this point in the history
…tion.

Issue #164.
  • Loading branch information
david-cattermole committed Oct 29, 2020
1 parent 29e53c9 commit 0651da4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions python/mmSolver/tools/registerevents/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,24 @@

import time
import mmSolver.logger
import mmSolver.tools.userpreferences.constant as userprefs_const
import mmSolver.tools.userpreferences.lib as userprefs_lib
import mmSolver.utils.event as event_utils

LOG = mmSolver.logger.get_logger()


def run_connect_markers_to_active_collection(**kwargs):
# Enable a toggle to turn on or off this affect.
config = userprefs_lib.get_config()
key = userprefs_const.REG_EVNT_ADD_NEW_MKR_TO_KEY
run_event = userprefs_lib.get_value(config, key)
msg = "run_connect_markers_to: run=%r kwargs=%s"
LOG.warn(msg, run_event, kwargs)
if run_event == userprefs_const.REG_EVNT_ADD_NEW_MKR_TO_NONE_VALUE:
LOG.warn("SKIP")
return

LOG.debug("run_connect_markers_to_active_collection: %s", kwargs)
s = time.time()
import mmSolver.api as mmapi
Expand Down

0 comments on commit 0651da4

Please sign in to comment.