Fix 'static override' message showing in ID template tooltip.

We only want to show that when library overrides are enabled.
This commit is contained in:
Bastien Montagne 2019-04-11 17:46:10 +02:00
parent a0a08c643e
commit 6b06440ed8
1 changed files with 4 additions and 2 deletions

View File

@ -713,8 +713,10 @@ static void template_ID(
but = uiDefIconBut(
block, UI_BTYPE_BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0, 0, UI_UNIT_X, UI_UNIT_Y,
NULL, 0, 0, 0, 0,
TIP_("Direct linked library data-block, click to make local, "
"Shift + Click to create a static override"));
BKE_override_static_is_enabled() ?
TIP_("Direct linked library data-block, click to make local, "
"Shift + Click to create a static override") :
TIP_("Direct linked library data-block, click to make local"));
if (disabled) {
UI_but_flag_enable(but, UI_BUT_DISABLED);
}