[longomatch] Fix UpdateProject function.
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix UpdateProject function.
- Date: Wed, 18 Mar 2015 14:44:48 +0000 (UTC)
commit e84ca6514300af1c8c8a6714914a13f69d8e17eb
Author: Julien Moutte <julien fluendo com>
Date: Mon Mar 16 12:49:36 2015 +0100
Fix UpdateProject function.
We were only updating the Tree model and not our internal project list. This was breaking the
RemoveProjects function which relies on instances in both list to be identical as it uses the Remove function
from List class. Make sure we also update our list with the new project description.
LongoMatch.GUI/Gui/Component/ProjectListWidget.cs | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
b/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
index 349cb3e..83c217a 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
@@ -145,8 +145,11 @@ namespace LongoMatch.Gui.Component
while (store.IterIsValid (first)) {
ProjectDescription pd = store.GetValue (first, COL_PROJECT_DESCRIPTION) as
ProjectDescription;
if (description.ID == pd.ID) {
+ // Change value in model
store.SetValue (first, COL_DISPLAY_NAME, FormatDesc (description));
store.SetValue (first, COL_PROJECT_DESCRIPTION, description);
+ // Also update our internal list
+ projects[projects.IndexOf (pd)] = description;
break;
}
store.IterNext (ref first);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]