Skip to content

Commit 4c37e54

Browse files
Optimize redraw: ElemSetGlow() checks for GlowEn
1 parent ddf0f22 commit 4c37e54

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/GUIslice.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3395,12 +3395,14 @@ void gslc_ElemSetGlow(gslc_tsGui* pGui,gslc_tsElemRef* pElemRef,bool bGlowing)
33953395
GSLC_DEBUG2_PRINT_CONST(ERRSTR_NULL,FUNCSTR);
33963396
return;
33973397
}
3398-
// FIXME: Should also check for change in bGlowEn
3399-
bool bGlowingOld = gslc_ElemGetGlow(pGui,pElemRef);
3400-
gslc_SetElemRefFlag(pGui,pElemRef,GSLC_ELEMREF_GLOWING,(bGlowing)?GSLC_ELEMREF_GLOWING:0);
3398+
// Only change glow state if enabled
3399+
if (gslc_ElemGetGlowEn(pGui, pElemRef)) {
3400+
bool bGlowingOld = gslc_ElemGetGlow(pGui, pElemRef);
3401+
gslc_SetElemRefFlag(pGui, pElemRef, GSLC_ELEMREF_GLOWING, (bGlowing) ? GSLC_ELEMREF_GLOWING : 0);
34013402

3402-
if (bGlowing != bGlowingOld) {
3403-
gslc_ElemSetRedraw(pGui,pElemRef,GSLC_REDRAW_INC);
3403+
if (bGlowing != bGlowingOld) {
3404+
gslc_ElemSetRedraw(pGui, pElemRef, GSLC_REDRAW_INC);
3405+
}
34043406
}
34053407
}
34063408

src/GUIslice_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
// Define current release (X.Y.Z) & build number
3737
// =======================================================================
3838

39-
#define GUISLICE_VER "0.13.0"
39+
#define GUISLICE_VER "0.13.0.3"
4040

4141
#endif // _GUISLICE_VERSION_H_
4242

0 commit comments

Comments
 (0)