File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Current
2
2
3
3
- A Spanish translation update by cyphra.
4
+ - Resolved a crash when inverting the worksheet (#1951 )
4
5
5
6
# 24.08.0
6
7
Original file line number Diff line number Diff line change @@ -1411,9 +1411,12 @@ wxColor Configuration::MakeColorDifferFromBackground(wxColor color) {
1411
1411
return InvertColour (color);
1412
1412
} else {
1413
1413
int maxOldCol = std::max (std::max (color.Red (), color.Green ()), color.Blue ());
1414
- return wxColour (newBrightness * color.Red () / maxOldCol,
1415
- newBrightness * color.Green () / maxOldCol,
1416
- newBrightness * color.Blue () / maxOldCol);
1414
+ if (maxOldCol < 1 )
1415
+ return *wxWHITE;
1416
+ else
1417
+ return wxColour (newBrightness * color.Red () / maxOldCol,
1418
+ newBrightness * color.Green () / maxOldCol,
1419
+ newBrightness * color.Blue () / maxOldCol);
1417
1420
}
1418
1421
}
1419
1422
You can’t perform that action at this time.
0 commit comments