forked from mia/Aegisub
Only add alpha tags if the user actually changes the alpha
This commit is contained in:
parent
9e37e0897f
commit
50baf2d97f
1 changed files with 4 additions and 1 deletions
|
@ -312,7 +312,10 @@ void show_color_picker(const agi::Context *c, agi::Color (AssStyle::*field), con
|
|||
int commit_id = -1;
|
||||
bool ok = GetColorFromUser(c->parent, color, true, [&](agi::Color new_color) {
|
||||
set_tag(line, blocks, tag, new_color.GetAssOverrideFormatted(), sel_start, sel_end);
|
||||
set_tag(line, blocks, alpha, str(boost::format("&H%02X&") % (int)new_color.a), sel_start, sel_end);
|
||||
if (new_color.a != color.a) {
|
||||
set_tag(line, blocks, alpha, str(boost::format("&H%02X&") % (int)new_color.a), sel_start, sel_end);
|
||||
color.a = new_color.a;
|
||||
}
|
||||
commit_text(c, _("set color"), sel_start, sel_end, &commit_id);
|
||||
});
|
||||
commit_text(c, _("set color"), -1, -1, &commit_id);
|
||||
|
|
Loading…
Reference in a new issue