修复selectedColor变量未定义错误:在PicBoxTemp_MouseMove方法的普通绘制模式部分重新获取温差图例颜色
This commit is contained in:
@@ -1888,8 +1888,15 @@ namespace JoyD.Windows.CS
|
||||
g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
// 普通绘制模式
|
||||
// 重新获取选中的温差图例颜色(因为之前的selectedColor变量超出了作用域)
|
||||
Color selectedColor = Color.White; // 默认颜色
|
||||
if (hasSelectedLegend && selectedRowIndex >= 0 && selectedRowIndex < tempDiffData.Count)
|
||||
{
|
||||
selectedColor = (Color)tempDiffData[selectedRowIndex]["color"];
|
||||
}
|
||||
|
||||
// 计算考虑图像缩放比例的画笔大小
|
||||
int adjustedBrushSize = _currentBrushSize;
|
||||
if (picBoxTemp.Image != null)
|
||||
|
||||
Reference in New Issue
Block a user