Do not color removed/added when nothing removed and nothing added

This commit is contained in:
Jesse van den Kieboom 2015-12-21 22:38:25 +01:00
parent 377563a2ad
commit 7d6524c011

View File

@ -158,8 +158,13 @@ public class Gitg.DiffStat : Gtk.DrawingArea
x -= padding.right + wbar;
}
if (added == 0 ||
removed == 0)
if (added == 0 && removed == 0)
{
sctx.save();
sctx.render_background(context, x, ybar, wrest, hbar);
sctx.restore();
}
else if (added == 0 || removed == 0)
{
sctx.save();
sctx.add_class(added == 0 ? "removed-only" : "added-only");