ginga icon indicating copy to clipboard operation
ginga copied to clipboard

Mosaic should not error when active mosaic is deleted

Open pllim opened this issue 8 years ago • 0 comments

Currently if Mosaic plugin is active, and the current mosaic is deleted by user, and then user drags another file into mosaic, it will give the following error in the log:

2016-03-23 20:07:35,445 | E | GwMain.py:86 (update_pending) | gui error: 'mosaic2'
2016-03-23 20:07:35,449 | E | GwMain.py:90 (update_pending) | Traceback:
  File ".../ginga/gw/GwMain.py", line 81, in update_pending
    res = future.thaw(suppress_exception=False)
  File ".../ginga/misc/Future.py", line 40, in thaw
    res = self.method(*self.args, **self.kwdargs)
  File ".../ginga/misc/plugins/Mosaic.py", line 314, in _inline
    iminfo = self.chinfo.get_image_info(self.img_mosaic.get('name'))
  File ".../ginga/Control.py", line 1378, in get_image_info
    return self.image_index[imname]

Mosaic should listen to remove-image callback and performs a clean up if the image being removed is the active mosaic.

pllim avatar Mar 24 '16 00:03 pllim