Fix auto cel guides painting of right and lower sides

This commit is contained in:
David Capello 2020-07-21 16:56:23 -03:00
parent 5f747cd0dc
commit 0c194adef6

View File

@ -1206,7 +1206,7 @@ void Editor::drawCelHGuide(ui::Graphics* g,
const int dottedX)
{
gfx::Color color = color_utils::color_for_ui(Preferences::instance().guides.autoGuidesColor());
g->drawHLine(color, scrX1, scrY, scrX2 - scrX1);
g->drawHLine(color, std::min(scrX1, scrX2), scrY, std::abs(scrX2 - scrX1));
// Vertical guide to touch the horizontal line
{
@ -1232,7 +1232,7 @@ void Editor::drawCelVGuide(ui::Graphics* g,
const int dottedY)
{
gfx::Color color = color_utils::color_for_ui(Preferences::instance().guides.autoGuidesColor());
g->drawVLine(color, scrX, scrY1, scrY2 - scrY1);
g->drawVLine(color, scrX, std::min(scrY1, scrY2), std::abs(scrY2 - scrY1));
// Horizontal guide to touch the vertical line
{