summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0000a4c)
G keypress event would cause a crash if no data
Q keypress didn't work.
Thanks to @iceman1001 for identifying and providing the fixes.
int Plot::yCoordOf(int v, QRect r, int maxVal)
{
int z = (r.bottom() - r.top())/2;
int Plot::yCoordOf(int v, QRect r, int maxVal)
{
int z = (r.bottom() - r.top())/2;
+ if ( maxVal == 0 ) maxVal++;
return -(z * v) / maxVal + z;
}
return -(z * v) / maxVal + z;
}
CursorBPos = 0;
setWindowTitle(tr("Sliders"));
CursorBPos = 0;
setWindowTitle(tr("Sliders"));
}
void Plot::closeEvent(QCloseEvent *event)
}
void Plot::closeEvent(QCloseEvent *event)
class Plot: public QWidget
{
private:
class Plot: public QWidget
{
private:
int GraphStart;
double GraphPixelsPerPoint;
int CursorAPos;
int GraphStart;
double GraphPixelsPerPoint;
int CursorAPos;