Skip to content

Commit

Permalink
Merge from 3.x: PR #4477
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed May 15, 2017
2 parents d9cb108 + 5c27d77 commit 8734731
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spyder/plugins/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,16 @@ def setup_page(self):
(_("Tabulations"), '*\t*')), 'indent_chars')
tabwidth_spin = self.create_spinbox(_("Tab stop width:"), _("spaces"),
'tab_stop_width_spaces', 4, 1, 8, 1)
def enable_tabwidth_spin(index):
if index == 7: # Tabulations
tabwidth_spin.plabel.setEnabled(True)
tabwidth_spin.spinbox.setEnabled(True)
else:
tabwidth_spin.plabel.setEnabled(False)
tabwidth_spin.spinbox.setEnabled(False)

indent_chars_box.combobox.currentIndexChanged.connect(enable_tabwidth_spin)

tab_mode_box = newcb(_("Tab always indent"),
'tab_always_indent', default=False,
tip=_("If enabled, pressing Tab will always indent,\n"
Expand Down

0 comments on commit 8734731

Please sign in to comment.