diff --git a/CHANGES.md b/CHANGES.md index c0a77fe6d..ddad10f3a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,8 @@ Full changelog v0.16.0 (unreleased) -------------------- +* Don't sync color and transparency of image layers by default. [#2116] + * Python 2.7 and 3.5 are no longer supported. [#2075] * Fixed bugs in the profile viewer that occurred when using the profile viewer and diff --git a/glue/viewers/image/qt/tests/test_data_viewer.py b/glue/viewers/image/qt/tests/test_data_viewer.py index f4d6d75b7..ed744f326 100644 --- a/glue/viewers/image/qt/tests/test_data_viewer.py +++ b/glue/viewers/image/qt/tests/test_data_viewer.py @@ -44,6 +44,19 @@ def init_data(self): def test_double_add_ignored(self): pass + def test_update_data_processed_if_data_present(self): + + # Patch for the main test of the same name - we need to explicilty set + # global_sync to True here for things to work correctly. + + self.init_draw_count() + self.data_collection.append(self.data) + self.viewer.add_data(self.data) + ct0 = self.draw_count + self.viewer.state.layers[0].global_sync = True + self.data.style.color = 'blue' + assert self.draw_count > ct0 + def test_slice_change_single_draw(self): # Regression test for a bug that caused Matplotlib to draw once per diff --git a/glue/viewers/image/state.py b/glue/viewers/image/state.py index 3d082e2d9..2fe588794 100644 --- a/glue/viewers/image/state.py +++ b/glue/viewers/image/state.py @@ -493,9 +493,9 @@ class ImageLayerState(BaseImageLayerState): stretch = DDSCProperty(docstring='The stretch used to render the layer, ' 'which should be one of ``linear``, ' '``sqrt``, ``log``, or ``arcsinh``') - global_sync = DDCProperty(True, docstring='Whether the color and transparency ' - 'should be synced with the global ' - 'color and transparency for the data') + global_sync = DDCProperty(False, docstring='Whether the color and transparency ' + 'should be synced with the global ' + 'color and transparency for the data') def __init__(self, layer=None, viewer_state=None, **kwargs):