Skip to content
Snippets Groups Projects
Commit ed38d62c authored by Kai Koehne's avatar Kai Koehne
Browse files

Fix crash in cpp text editor

Crashes were introduced in commit 9d803829.
Reverting this, to have a second look.
parent 9c12ef51
No related branches found
No related tags found
No related merge requests found
...@@ -1095,11 +1095,11 @@ void CPPEditor::updateMethodBoxIndexNow() ...@@ -1095,11 +1095,11 @@ void CPPEditor::updateMethodBoxIndexNow()
int line = 0, column = 0; int line = 0, column = 0;
convertPosition(position(), &line, &column); convertPosition(position(), &line, &column);
m_overviewModelIndex = indexForPosition(line, column); QModelIndex overviewModelIndex = indexForPosition(line, column);
emit overviewModelIndexChanged(m_overviewModelIndex); emit overviewModelIndexChanged(overviewModelIndex);
// ComboBox only let's you select top level indexes! // ComboBox only let's you select top level indexes!
QModelIndex comboIndex = m_overviewModelIndex; QModelIndex comboIndex = overviewModelIndex;
while (comboIndex.parent().isValid()) while (comboIndex.parent().isValid())
comboIndex = comboIndex.parent(); comboIndex = comboIndex.parent();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment