Commit d330320f authored by Roopesh Chander's avatar Roopesh Chander Committed by Thorbjørn Lindeijer
Browse files

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.
parent bf228912
......@@ -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<QTextBlock> currentBlocks(2, _block); // [0] looks back; [1] looks forward
int maxLookAround = 100;
while (maxLookAround-- > 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment