Fix #37036, pack and refresh button not aligned anymore. Also add

operator for opening images in the image editor header, it's easily one
of the most common operations, don't see why it has to be only accessed
from menu.
This commit is contained in:
Antony Riakiotakis 2013-10-10 23:33:59 +00:00
parent 3f5be1ef0a
commit 187f664c75
2 changed files with 2 additions and 2 deletions

@ -390,7 +390,7 @@ class IMAGE_HT_header(Header):
if show_maskedit:
sub.menu("MASK_MT_mask")
layout.template_ID(sima, "image", new="image.new")
layout.template_ID(sima, "image", new="image.new", open="image.open")
if not show_render:
layout.prop(sima, "use_image_pin", text="")

@ -640,7 +640,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
else
uiItemO(row, "", ICON_UGLYPACKAGE, "image.pack");
row = uiLayoutRow(row, FALSE);
row = uiLayoutRow(row, TRUE);
uiLayoutSetEnabled(row, ima->packedfile == NULL);
uiItemR(row, &imaptr, "filepath", 0, "", ICON_NONE);
uiItemO(row, "", ICON_FILE_REFRESH, "image.reload");