Skip to content

Commit 38322ce

Browse files
[[ Bugfix 11367 ]] Gradient inspector not fully drawn on first opening.
1 parent f18445c commit 38322ce

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

docs/notes/bugfix-11367.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Gradient inspector does not draw fully

engine/src/graphicscontext.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,8 @@ void MCGraphicsContext::getmiterlimit(real8 &r_limit)
578578

579579
void MCGraphicsContext::setgradient(MCGradientFill *p_gradient)
580580
{
581-
if (p_gradient != NULL && p_gradient -> kind != kMCGradientKindNone)
581+
// MM-2013-10-32: [[ Bug 11367 ]] Added check to make sure ramp lenght isn't 0. Was causing issues with gradient inspector.
582+
if (p_gradient != NULL && p_gradient -> kind != kMCGradientKindNone && p_gradient -> ramp_length != 0)
582583
{
583584
MCGGradientFunction t_function;
584585
t_function = kMCGGradientFunctionLinear;

0 commit comments

Comments
 (0)