>Font settings (e.g. bold) sometimes bleed into a different components

This commit is contained in:
Bane Stojkovic
2022-11-24 16:37:10 +01:00
parent 58f73e7c24
commit d0f6c78b5b
3 changed files with 9 additions and 2 deletions
@@ -22,6 +22,7 @@ import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Composite;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
@@ -298,6 +299,7 @@ public class DrawingManager {
g2dWrapper.stopTracking();
}
Composite oldComposite = g2d.getComposite();
Font oldFont = g2d.getFont();
// Draw locked components in a new composite.
if (lockedComponents.contains(component) && drawOptions.contains(DrawOption.LOCKED_ALPHA)) {
g2d.setComposite(lockedComposite);
@@ -325,6 +327,7 @@ public class DrawingManager {
g2dWrapper.stopTracking();
// revert composite
g2d.setComposite(oldComposite);
g2d.setFont(oldFont);
// record render stats
long componentEnd = System.nanoTime();
Counter stats = null;
@@ -4197,6 +4197,10 @@
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Variants of boards having explicit sizing mode fail when trying to add to a project</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Font settings (e.g. bold) sometimes bleed into wrong component</description>
</org.diylc.appframework.update.Change>
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>
@@ -229,11 +229,11 @@ public class RegressionTestRunner {
res.failed("Images do not match!");
}
RegressionTestResult netlistResultWithSwitches = testNetlist(file, presenter, res, outputDir, inputDir, true);
testNetlist(file, presenter, res, outputDir, inputDir, true);
// if (netlistResultWithSwitches != null)
// res.merge(netlistResultWithSwitches);
RegressionTestResult netlistResultWithoutSwitches = testNetlist(file, presenter, res, outputDir, inputDir, false);
testNetlist(file, presenter, res, outputDir, inputDir, false);
// if (netlistResultWithoutSwitches != null)
// res.merge(netlistResultWithoutSwitches);