Skip to content

Commit

Permalink
Fix error unwanted scrolling when changing tabs.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaverde committed Jun 14, 2017
1 parent 39824e6 commit 725c015
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spyder/widgets/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,11 @@ def set_stack_title(self, index, is_modified):
is_readonly = finfo.editor.isReadOnly()
tab_text = self.get_tab_text(index, is_modified, is_readonly)
tab_tip = self.get_tab_tip(fname, is_modified, is_readonly)
self.tabs.setTabText(index, tab_text)

# Only update tab text if have changed, otherwise an unwanted scrolling
# will happen when changing tabs. See Issue #1170.
if tab_text != self.tabs.tabText(index):
self.tabs.setTabText(index, tab_text)
self.tabs.setTabToolTip(index, tab_tip)


Expand Down

0 comments on commit 725c015

Please sign in to comment.