mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 19:50:45 +00:00
Windows report print crash
This commit is contained in:
parent
9ef0065a6d
commit
07188c2cde
@ -721,8 +721,27 @@ void MainWindow::PrintReport(gGraphView *gv,QString name, QDate date)
|
|||||||
float realheight=res.height()-footer_height;
|
float realheight=res.height()-footer_height;
|
||||||
float ph=realheight / graphs_per_page;
|
float ph=realheight / graphs_per_page;
|
||||||
|
|
||||||
float div=highres ? 4.0 : 1.0;
|
float div,fontdiv;
|
||||||
float fontdiv=highres ? 2.3 : 0.75;
|
if (pw>8000) {
|
||||||
|
div=4;
|
||||||
|
#ifdef Q_WS_WIN32
|
||||||
|
fontdiv=2;
|
||||||
|
#else
|
||||||
|
fontdiv=2.3;
|
||||||
|
#endif
|
||||||
|
} else if (pw>2000) {
|
||||||
|
div=2;
|
||||||
|
fontdiv=1;
|
||||||
|
} else {
|
||||||
|
div=1;
|
||||||
|
#ifdef Q_WS_WIN32 // windows really doesn like the resulting font size
|
||||||
|
fontdiv=1;
|
||||||
|
#else
|
||||||
|
fontdiv=0.75;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
//float div=highres ? 4.0 : 1.0;
|
||||||
|
|
||||||
|
|
||||||
float gw=pw/div;
|
float gw=pw/div;
|
||||||
float gh=ph/div;
|
float gh=ph/div;
|
||||||
|
Loading…
Reference in New Issue
Block a user