From 7b199e4fa732dc7e0019998da30c9d33f35d39d8 2014-08-12 18:23:57 From: Jason Grout Date: 2014-08-12 18:23:57 Subject: [PATCH] Before syncing a widget's state, check first for the property lock, then for the widget state lock --- diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index 7bfd4e0..ce215a0 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -280,10 +280,13 @@ class Widget(LoggingConfigurable): def _should_send_property(self, key, value): """Check the property lock (property_lock)""" - if self._send_state_lock > 0: + if (key == self._property_lock[0] and value == self._property_lock[1]): + return False + elif self._send_state_lock > 0: self._states_to_send.add(key) return False - return key != self._property_lock[0] or value != self._property_lock[1] + else: + return True # Event handlers @_show_traceback