Commit f35966dc authored by Sebastien Granjoux's avatar Sebastien Granjoux

project-manager: do not clear tree view when reloading a project

parent cdff7a12
...@@ -854,7 +854,6 @@ gbf_project_model_update_shortcut (GbfProjectModel *model, AnjutaProjectNode *pa ...@@ -854,7 +854,6 @@ gbf_project_model_update_shortcut (GbfProjectModel *model, AnjutaProjectNode *pa
} }
} }
void void
gbf_project_model_update_tree (GbfProjectModel *model, AnjutaProjectNode *parent, GtkTreeIter *iter) gbf_project_model_update_tree (GbfProjectModel *model, AnjutaProjectNode *parent, GtkTreeIter *iter)
{ {
...@@ -875,15 +874,20 @@ gbf_project_model_update_tree (GbfProjectModel *model, AnjutaProjectNode *parent ...@@ -875,15 +874,20 @@ gbf_project_model_update_tree (GbfProjectModel *model, AnjutaProjectNode *parent
AnjutaProjectNode* data_node = NULL; AnjutaProjectNode* data_node = NULL;
/* Look for current node */ /* Look for current node */
gtk_tree_model_get (GTK_TREE_MODEL (model), &child, gtk_tree_model_get (GTK_TREE_MODEL (model), &child,
GBF_PROJECT_MODEL_COLUMN_DATA, &data, GBF_PROJECT_MODEL_COLUMN_DATA, &data,
-1); -1);
data_node = gbf_tree_data_get_node (data); data_node = gbf_tree_data_get_node (data);
/* Skip shortcuts */
if (data->type == GBF_TREE_NODE_SHORTCUT)
{
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &child);
continue;
}
node = g_list_find (nodes, data_node); node = g_list_find (nodes, data_node);
if (node != NULL) if (node != NULL)
{ {
/* Node already exist, remove it from the list */ /* Node already exist, remove it from the list */
...@@ -895,7 +899,6 @@ gbf_project_model_update_tree (GbfProjectModel *model, AnjutaProjectNode *parent ...@@ -895,7 +899,6 @@ gbf_project_model_update_tree (GbfProjectModel *model, AnjutaProjectNode *parent
/* update recursively */ /* update recursively */
gbf_project_model_update_tree (model, data_node, &child); gbf_project_model_update_tree (model, data_node, &child);
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &child); valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &child);
} }
else else
...@@ -1040,12 +1043,14 @@ gbf_project_model_set_project (GbfProjectModel *model, AnjutaPmProject *project) ...@@ -1040,12 +1043,14 @@ gbf_project_model_set_project (GbfProjectModel *model, AnjutaPmProject *project)
{ {
g_return_if_fail (model != NULL && GBF_IS_PROJECT_MODEL (model)); g_return_if_fail (model != NULL && GBF_IS_PROJECT_MODEL (model));
if (model->priv->proj) if (model->priv->proj != project)
{
unload_project (model); unload_project (model);
/* project can be NULL */ /* project can be NULL */
if (project) if (project)
load_project (model, project); load_project (model, project);
}
} }
AnjutaPmProject * AnjutaPmProject *
......
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