Commit f414179b authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QuickToolbar: proper indentation for gradient editing

parent a6a37ec5
...@@ -238,13 +238,16 @@ void QmlContextPane::setProperty(const QString &propertyName, const QVariant &va ...@@ -238,13 +238,16 @@ void QmlContextPane::setProperty(const QString &propertyName, const QVariant &va
} }
int column; int column;
m_editor->convertPosition(changeSet.operationList().first().pos1, &line, &column); //get line
m_editor->convertPosition(changeSet.operationList().first().pos1 + changeSet.operationList().first().length1, &endLine, &column); //get line
int changeSetPos = changeSet.operationList().last().pos1;
int changeSetLength = changeSet.operationList().last().text.length();
QTextCursor tc = m_editor->editor()->textCursor(); QTextCursor tc = m_editor->editor()->textCursor();
tc.beginEditBlock(); tc.beginEditBlock();
changeSet.apply(&tc); changeSet.apply(&tc);
m_editor->convertPosition(changeSetPos, &line, &column); //get line
m_editor->convertPosition(changeSetPos + changeSetLength, &endLine, &column); //get line
if (line > 0) { if (line > 0) {
TextEditor::TabSettings ts = m_editor->editor()->tabSettings(); TextEditor::TabSettings ts = m_editor->editor()->tabSettings();
QmlJSIndenter indenter; QmlJSIndenter indenter;
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