From d330320fc77e8f3e3b8cfa780935ba5c0805f42a Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Sat, 31 Oct 2009 15:49:42 +0530 Subject: [PATCH] make auto-spaces-for-tabs work only if spaces-for-tabs is checked This is to make it consistent with the rest of the settings ui. When a checkbox is unchecked, the sub-check box becomes invalid, its functionality is disabled, but it retains its checked state. --- src/plugins/texteditor/tabsettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/tabsettings.cpp b/src/plugins/texteditor/tabsettings.cpp index f5bf66eecd9..e82656a0d37 100644 --- a/src/plugins/texteditor/tabsettings.cpp +++ b/src/plugins/texteditor/tabsettings.cpp @@ -230,7 +230,7 @@ int TabSettings::indentedColumn(int column, bool doIndent) const } bool TabSettings::guessSpacesForTabs(const QTextBlock& _block) const { - if (m_autoSpacesForTabs && _block.isValid()) { + if (m_spacesForTabs && m_autoSpacesForTabs && _block.isValid()) { QVector currentBlocks(2, _block); // [0] looks back; [1] looks forward int maxLookAround = 100; while (maxLookAround-- > 0) {