forked from qt-creator/qt-creator
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.
This commit is contained in:
committed by
Thorbjørn Lindeijer
parent
bf2289127f
commit
d330320fc7
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user