[longomatch] Fix deletion of templates after renaming with invalid chars
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix deletion of templates after renaming with invalid chars
- Date: Thu, 23 Apr 2015 15:19:22 +0000 (UTC)
commit a7dfa98f030bd974f6e46568e4f72f9f82dcdfd2
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Apr 16 18:25:04 2015 +0200
Fix deletion of templates after renaming with invalid chars
LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs | 2 +-
LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
b/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
index e084615..e5e0fb3 100644
--- a/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
@@ -435,9 +435,9 @@ namespace LongoMatch.Gui.Panel
} else {
try {
Dashboard dashboard = provider.Load (name);
- provider.Delete (name);
dashboard.Name = args.NewText;
provider.Save (dashboard);
+ provider.Delete (name);
// Change displayed name and template name in our store
templates.SetValue (iter, 1, args.NewText);
templates.SetValue (iter, 2, args.NewText);
diff --git a/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs b/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
index 8df54e5..885a2ff 100644
--- a/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
@@ -380,9 +380,9 @@ namespace LongoMatch.Gui.Panel
} else {
try {
Team team = provider.Load (name);
- provider.Delete (name);
team.Name = args.NewText;
provider.Save (team);
+ provider.Delete (name);
teams.SetValue (iter, 1, args.NewText);
teams.SetValue (iter, 2, args.NewText);
} catch (Exception ex) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]