Commit 9d803829 authored by Kai Koehne's avatar Kai Koehne

CppEditor: Don't calculate current index twice

parent ecf2a703
......@@ -1095,11 +1095,11 @@ void CPPEditor::updateMethodBoxIndexNow()
int line = 0, column = 0;
convertPosition(position(), &line, &column);
QModelIndex m_overviewModelIndex = indexForPosition(line, column);
m_overviewModelIndex = indexForPosition(line, column);
emit overviewModelIndexChanged(m_overviewModelIndex);
// ComboBox only let's you select top level indexes!
QModelIndex comboIndex = indexForPosition(line, column);
QModelIndex comboIndex = m_overviewModelIndex;
while (comboIndex.parent().isValid())
comboIndex = comboIndex.parent();
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