Skip to content

Commit

Permalink
Variable Explorer: Don't refresh it after giving focus to it
Browse files Browse the repository at this point in the history
Fixes #2593
  • Loading branch information
ccordoba12 committed Aug 23, 2015
1 parent ac1bd3b commit 7d60d90
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions spyderlib/widgets/externalshell/namespacebrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,23 @@ def option_changed(self, option, value):
settings = self.get_view_settings()
communicate(self._get_sock(),
'set_remote_view_settings()', settings=[settings])

def visibility_changed(self, enable):
"""Notify the widget whether its container (the namespace browser
"""Notify the widget whether its container (the namespace browser
plugin is visible or not"""
self.is_visible = enable
if enable:
self.refresh_table()

# This is slowing down Spyder a lot if too much data is present in
# the Variable Explorer, and users give focus to it after being hidden.
# This also happens when the Variable Explorer is visible and users
# give focus to Spyder after using another application (like Chrome
# or Firefox).
# That's why we've decided to remove this feature
# Fixes Issue 2593
#
# self.is_visible = enable
# if enable:
# self.refresh_table()
pass

def toggle_auto_refresh(self, state):
"""Toggle auto refresh state"""
self.autorefresh = state
Expand Down

0 comments on commit 7d60d90

Please sign in to comment.