Commit 39b7faa1 authored by dt_'s avatar dt_ Committed by Daniel Teske
Browse files

Fix first rename after creating a new project

Change-Id: Iec997ba24a11a5035d3f70ce5818d44142f3c5a6
Task-Nr: QTCREATORBUG-5116
Reviewed-on: http://codereview.qt.nokia.com/440

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent fa48cf8a
...@@ -2569,7 +2569,7 @@ void ProjectExplorerPlugin::renameFile() ...@@ -2569,7 +2569,7 @@ void ProjectExplorerPlugin::renameFile()
ProjectTreeWidget *treeWidget = qobject_cast<ProjectTreeWidget*>(focusWidget); ProjectTreeWidget *treeWidget = qobject_cast<ProjectTreeWidget*>(focusWidget);
if (treeWidget) { if (treeWidget) {
treeWidget->editCurrentItem(); treeWidget->editCurrentItem();
break; return;
} }
focusWidget = focusWidget->parentWidget(); focusWidget = focusWidget->parentWidget();
} }
......
...@@ -273,8 +273,8 @@ void ProjectTreeWidget::setAutoSynchronization(bool sync, bool syncNow) ...@@ -273,8 +273,8 @@ void ProjectTreeWidget::setAutoSynchronization(bool sync, bool syncNow)
void ProjectTreeWidget::editCurrentItem() void ProjectTreeWidget::editCurrentItem()
{ {
if (!m_view->selectionModel()->selectedIndexes().isEmpty()) if (m_view->selectionModel()->currentIndex().isValid())
m_view->edit(m_view->selectionModel()->selectedIndexes().first()); m_view->edit(m_view->selectionModel()->currentIndex());
} }
void ProjectTreeWidget::setCurrentItem(Node *node, Project *project) void ProjectTreeWidget::setCurrentItem(Node *node, Project *project)
......
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