Index: src/RotateCommand.cs
===================================================================
--- src/RotateCommand.cs	(revisione 3521)
+++ src/RotateCommand.cs	(copia locale)
@@ -40,14 +40,12 @@
 	public class RotateOperation : Operation {
 		IBrowsableItem item;
 		RotateDirection direction;
-		int version_index;
 		bool done;
 
 		public RotateOperation (IBrowsableItem item, RotateDirection direction)
 		{
 			this.item = item;
 			this.direction = direction;
-			version_index = 0;
 			done = false;
 		}
 
@@ -120,16 +118,9 @@
 			if (done)
 				return false;
 
-			if (item is Photo) {
-				Photo p = (Photo) item;
+			original_path = item.DefaultVersionUri.LocalPath;
+			done = true;
 
-				original_path = p.GetVersionPath (p.VersionIds [version_index++]);
-				done = (version_index >= p.VersionIds.Length);
-			} else {
-				original_path = item.DefaultVersionUri.LocalPath;
-				done = true;
-			}
-
 			if ((File.GetAttributes(original_path) & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
 				throw new RotateException ("Unable to rotate readonly file", original_path);
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revisione 3521)
+++ ChangeLog	(copia locale)
@@ -1,3 +1,8 @@
+2007-12-23  Lorenzo Milesi <maxxer@yetopen.it>
+
+	* src/RotateCommand.cs: rotate only default version of photo. Fix
+	bgo#505125.
+
 2007-12-21  Stephane Delcroix  <sdelcroix@novell.com>
 
 	* Updater.cs: use the return value of MoveTableToTemp, drop
