blam r675 - trunk/src



Author: cmartin
Date: Sun Mar  8 23:46:59 2009
New Revision: 675
URL: http://svn.gnome.org/viewvc/blam?rev=675&view=rev

Log:
Actually delete the channel from the source group when moving a channel between
two groups.

I forgot to delete it from the group's channels, so the channel would still show
the old contents.

Modified:
   trunk/src/ChannelList.cs

Modified: trunk/src/ChannelList.cs
==============================================================================
--- trunk/src/ChannelList.cs	(original)
+++ trunk/src/ChannelList.cs	Sun Mar  8 23:46:59 2009
@@ -143,6 +143,17 @@
 					return;
 				}
 
+				/*
+				 * If the channel was inside a group, we need to delete it there as well.
+				 * FIXME: Move this code into a helper function.
+				 */
+				foreach(ChannelGroup grp in Blam.Application.TheApp.CCollection.Groups){
+					if(grp.Channels.Contains(src as Channel)){
+						grp.Channels.Remove(src as Channel);
+						break;
+					}
+				}
+
 				src.Iter = (Model as TreeStore).AppendValues(iter, src);
 				(dst as ChannelGroup).Channels.Add(src);
 				(Model as TreeStore).Remove(ref tmp_iter);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]