Fix unnecessary separators in image editor Image menu.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 20 Feb 2016 19:18:58 +0000 (20:18 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 20 Feb 2016 19:22:51 +0000 (20:22 +0100)
release/scripts/startup/bl_ui/space_image.py

index d29cd18053f372206a608fbee94d5b97de3c0668..10b4e24efd9f7d9d3a6771841e048ee1f910788b 100644 (file)
@@ -208,19 +208,18 @@ class IMAGE_MT_image(Menu):
             layout.menu("IMAGE_MT_image_invert")
 
             if not show_render:
-                layout.separator()
-
                 if not ima.packed_file:
+                    layout.separator()
                     layout.operator("image.pack")
 
                 # only for dirty && specific image types, perhaps
                 # this could be done in operator poll too
                 if ima.is_dirty:
                     if ima.source in {'FILE', 'GENERATED'} and ima.type != 'OPEN_EXR_MULTILAYER':
+                        if ima.packed_file:
+                            layout.separator()
                         layout.operator("image.pack", text="Pack As PNG").as_png = True
 
-            layout.separator()
-
 
 class IMAGE_MT_image_invert(Menu):
     bl_label = "Invert"