Allow renaming images from list in layers panel by double clicking.
authorAntony Riakiotakis <kalast@gmail.com>
Thu, 24 Jul 2014 09:05:37 +0000 (11:05 +0200)
committerAntony Riakiotakis <kalast@gmail.com>
Thu, 24 Jul 2014 09:05:37 +0000 (11:05 +0200)
Thanks to Sebastian Koenig for the report!

release/scripts/startup/bl_ui/space_view3d_toolbar.py

index 6dd3ef27deb581f8f8264e4d1e1e1132d96d55e0..4caf25cdb50eff9523aaf24732fd17d2482bea1a 100644 (file)
@@ -1040,7 +1040,7 @@ class TEXTURE_UL_texpaintslots(UIList):
         ima = item
 
         if self.layout_type in {'DEFAULT', 'COMPACT'}:
-            layout.label(text=ima.name, translate=False, icon_value=icon)
+            layout.prop(item, "name", text="", emboss=False, icon_value=icon)
         elif self.layout_type in {'GRID'}:
             layout.alignment = 'CENTER'
             layout.label(text="")
@@ -1068,7 +1068,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
 
         if len(ob.material_slots) > 1:
             col.label("Materials")
-            col.template_list("MATERIAL_UL_matslots", "",
+            col.template_list("MATERIAL_UL_matslots", "layers",
                               ob, "material_slots",
                               ob, "active_material_index", rows=2)