banshee r4866 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor



Author: gburt
Date: Mon Dec 29 20:00:15 2008
New Revision: 4866
URL: http://svn.gnome.org/viewvc/banshee?rev=4866&view=rev

Log:
2008-12-29  Gabriel Burt  <gabriel burt gmail com>

	* src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/BasicTrackDetailsPage.cs:
	Patch from Ivan Zlatev, fixing bug where the first track's TrackCount
	value wasn't set properly when using the automagic-button (BGO #561083)


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs	Mon Dec 29 20:00:15 2008
@@ -118,12 +118,15 @@
                 : delegate (RangeEntry entry) {
                     for (int i = 0, n = Dialog.TrackCount; i < n; i++) {
                         EditorTrackInfo track = Dialog.LoadTrack (i);
-                        track.TrackNumber = i + 1;
-                        track.TrackCount = n;
-                        
+
                         if (Dialog.CurrentTrackIndex == i) {
-                            entry.From.Value = track.TrackNumber;
-                            entry.To.Value = track.TrackCount;
+                            // In this case the writeClosure is invoked, 
+                            // which will take care of updating the TrackInfo
+                            entry.From.Value = i + 1;
+                            entry.To.Value = n;
+                        } else {
+                            track.TrackNumber = i + 1;
+                            track.TrackCount = n;
                         }
                     }
                 }, Catalog.GetString ("Automatically set track number and count")), 



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