[longomatch] Make sure we are prompted to save after deleting a player
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Make sure we are prompted to save after deleting a player
- Date: Fri, 28 Nov 2014 10:40:16 +0000 (UTC)
commit 21dab3f0590e6a52dd265d501d7d38125032a2fc
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Nov 27 16:34:31 2014 +0100
Make sure we are prompted to save after deleting a player
LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
index 2c57386..580b1ee 100644
--- a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
+++ b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
@@ -115,6 +115,8 @@ namespace LongoMatch.Gui.Component
public void DeleteSelectedPlayers ()
{
+ bool edited = false;
+
if (selectedPlayers == null || selectedPlayers.Count == 0) {
return;
}
@@ -123,10 +125,13 @@ namespace LongoMatch.Gui.Component
string msg = Catalog.GetString ("Do you want to delete player: ") + p.Name;
if (Config.GUIToolkit.QuestionMessage (msg, null, this)) {
template.List.Remove (p);
- Edited = true;
+ edited = true;
}
}
- Team = template;
+ if (edited) {
+ teamtagger.Reload ();
+ Edited = true;
+ }
}
void ConnectSignals ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]