mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-13 23:51:46 -05:00
Patch major font rendering performance hit while zoomed
This commit is contained in:
parent
b3b933c8dd
commit
cfdbcf9bc3
@ -222,8 +222,15 @@ void SpectrumPanel::drawPanelContents() {
|
|||||||
fontEnumSize = GLFont::GLFONT_SIZE16;
|
fontEnumSize = GLFont::GLFONT_SIZE16;
|
||||||
hPos = 1.0 - (18.0 / viewHeight);
|
hPos = 1.0 - (18.0 / viewHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (double m = -1.0 + mhzStart, mMax = 1.0 + ((mhzStart>0)?mhzStart:-mhzStart); m <= mMax; m += mhzStep) {
|
for (double m = -1.0 + mhzStart, mMax = 1.0 + ((mhzStart>0)?mhzStart:-mhzStart); m <= mMax; m += mhzStep) {
|
||||||
|
if (m < -1.0) {
|
||||||
|
currentMhz += mhzVisualStep;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (m > 1.0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
label << std::fixed << currentMhz;
|
label << std::fixed << currentMhz;
|
||||||
|
|
||||||
double fractpart, intpart;
|
double fractpart, intpart;
|
||||||
|
Loading…
Reference in New Issue
Block a user