Commit 8e401b73 authored by Daniel Teske's avatar Daniel Teske

MiniTargetSelector: Reset current item after display name changes

Taking a item out of the list and reinserting it changes the current
item, so we need to set it again.

Change-Id: Iefcf5adc7a22d9d8b799963a584d496067f233f3
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 931cd8a8
......@@ -385,6 +385,10 @@ void GenericListWidget::rowChanged(int index)
void GenericListWidget::displayNameChanged()
{
m_ignoreIndexChange = true;
ProjectConfiguration *activeProjectConfiguration = 0;
if (currentItem())
activeProjectConfiguration = currentItem()->data(Qt::UserRole).value<ProjectConfiguration *>();
ProjectConfiguration *pc = qobject_cast<ProjectConfiguration *>(sender());
int index = -1;
int i = 0;
......@@ -408,6 +412,8 @@ void GenericListWidget::displayNameChanged()
}
}
insertItem(pos, lwi);
if (activeProjectConfiguration)
setCurrentItem(itemForProjectConfiguration(activeProjectConfiguration));
m_ignoreIndexChange = false;
}
......
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