Commit 5800bb42 authored by Daniel Teske's avatar Daniel Teske
Browse files

Remove broken code that tried to select the project node

This code only works in some cases

Change-Id: I7469ed2f14da4307cc6a3864a50eb577383082b3
Reviewed-on: http://codereview.qt.nokia.com/1079

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 675072f1
......@@ -101,8 +101,7 @@ ProjectTreeWidget::ProjectTreeWidget(QWidget *parent)
m_model(0),
m_filterProjectsAction(0),
m_autoSync(false),
m_autoExpand(true),
m_currentItemLocked(0)
m_autoExpand(true)
{
m_model = new FlatModel(m_explorer->session()->sessionNode(), this);
Project *pro = m_explorer->session()->startupProject();
......@@ -282,13 +281,6 @@ void ProjectTreeWidget::setCurrentItem(Node *node, Project *project)
if (debug)
qDebug() << "ProjectTreeWidget::setCurrentItem(" << (project ? project->displayName() : "0")
<< ", " << (node ? node->path() : "0") << ")";
if (m_currentItemLocked) {
if (m_currentItemLocked == node) {
m_currentItemLocked = 0;
return;
}
m_currentItemLocked = 0;
}
if (!project) {
return;
......@@ -326,10 +318,6 @@ void ProjectTreeWidget::showContextMenu(const QPoint &pos)
void ProjectTreeWidget::handleProjectAdded(ProjectExplorer::Project *project)
{
// We disable auto-synchronization for the current node so that the project
// is selected until another file is opened
m_currentItemLocked = m_model->nodeForIndex(m_view->currentIndex());
Node *node = project->rootProjectNode();
QModelIndex idx = m_model->indexForNode(node);
if (m_autoExpand) // disabled while session restoring
......
......@@ -101,7 +101,6 @@ private:
QString m_modelId;
bool m_autoSync;
bool m_autoExpand;
Node *m_currentItemLocked;
friend class ProjectTreeWidgetFactory;
};
......
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