From 5226131414d658e5f341fa902437a5cf0985a1bb Mon Sep 17 00:00:00 2001 From: Darrell Schiebel Date: Wed, 24 Jan 2024 21:39:38 -0500 Subject: [PATCH] fix cursor tracking failure with "specmode='mfs'" (fixes #28) --- casagui/toolbox/_cube.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/casagui/toolbox/_cube.py b/casagui/toolbox/_cube.py index b8b3dfa..6f57c3e 100644 --- a/casagui/toolbox/_cube.py +++ b/casagui/toolbox/_cube.py @@ -1004,7 +1004,12 @@ def _init_pipes( self ): cube_on( ) } } )''' ) ) if self._pipe['control'] is None: - self._pipe['control'] = DataPipe(address=find_ws_address( ), abort=self.__abort) + ### self._pipe['control']._freeze_cursor_update is used to keep track of whether pixel + ### update has been "frozen" (by typing 'f')... for "specmode='mfs'" _freeze_cursor_update + ### was undefined which resulted in failure to update pixel tracking... so it is now + ### initialized upon construction in JavaScript... + self._pipe['control'] = DataPipe( address=find_ws_address( ), abort=self.__abort, + init_script=CustomJS( code='''cb_obj._freeze_cursor_update = false''' ) ) def path( self ): '''return path to CASA image