Make the latest image version in the registration group the primary
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 26 Jul 2007 18:36:08 +0000 (20:36 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 26 Jul 2007 18:36:08 +0000 (20:36 +0200)
src/packages/kofoto/commandline/main.py

index ef81607..0858983 100755 (executable)
@@ -924,7 +924,8 @@ def registerHelper(env, destalbum, registrationTimeString, paths):
             else:
                 versiontype = ImageVersionType.Other
             try:
-                env.shelf.createImageVersion(image, vpath, versiontype)
+                iv = env.shelf.createImageVersion(image, vpath, versiontype)
+                iv.makePrimary()
                 image.setAttribute(u"registered", registrationTimeString)
                 if env.verbose:
                     if i == 0: