From f2850246fa4f56c9ef080d620d9b7266764dd273 Mon Sep 17 00:00:00 2001 From: Koen Schmeets Date: Sat, 21 Nov 2020 12:42:15 +0100 Subject: [PATCH] Move z-index of construction segments behind normal segments --- src/drawentity.cpp | 7 +++++-- test/constraint/angle/skew.png | Bin 4869 -> 4867 bytes 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/drawentity.cpp b/src/drawentity.cpp index fab40713..d8763360 100644 --- a/src/drawentity.cpp +++ b/src/drawentity.cpp @@ -472,13 +472,13 @@ void Entity::Draw(DrawAs how, Canvas *canvas) { int zIndex; if(IsPoint()) { - zIndex = 5; + zIndex = 6; } else if(how == DrawAs::HIDDEN) { zIndex = 2; } else if(group != SS.GW.activeGroup) { zIndex = 3; } else { - zIndex = 4; + zIndex = 5; } hStyle hs; @@ -488,6 +488,9 @@ void Entity::Draw(DrawAs how, Canvas *canvas) { hs.v = Style::NORMALS; } else { hs = Style::ForEntity(h); + if (hs.v == Style::CONSTRUCTION) { + zIndex = 4; + } } Canvas::Stroke stroke = Style::Stroke(hs); diff --git a/test/constraint/angle/skew.png b/test/constraint/angle/skew.png index 97fb0dbf53595dac63eef4b79d78fe3bb110b6cf..92d7577a44f841963122399714b2e8daae3d7690 100644 GIT binary patch delta 2296 zcmY*b3sjQX7CvC0`PRx;rj43*Q!Djq4-GJ1Yce(GmXc;_md*|HF=eTUzf9(gQ);Y# z%15OZWobS@LaijwQhJ!=HL>u4lbIPI6$$AdaIv|w?wYmET4%3)&e^YTe|w!%&L^GE zI)y&|KG1)6_C@Jf;!h*NcZvpj-O~>UGg()cch=Q*I+0hg4Eszfz5f~F;fg~($pLT!>(NyPwDX9fV> zODq84#d93aOBWQFvZy)%C>9;wbr}xF@cf&!3DSw0xoO>`oto-d+$@WK@m{_Zp-!>_^-MGDg04$FJHpF+ zDJoHZ8U_EMRvUpAk;hc|A;{D#0mOkLuwf7sbD{3qale(6im8{~QxFP_-8D#@)=&%R4%&r}B0SB}#%G zmWz@1K}u!y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