File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,12 @@ GraphDlg::~GraphDlg()
104104 delete ui;
105105}
106106
107+ void GraphDlg::reject ()
108+ {
109+ if ( !dataTimer.isActive () )
110+ QDialog::reject ();
111+ }
112+
107113void GraphDlg::reloadGraphs ()
108114{
109115 ui->plot ->clearGraphs ();
@@ -161,7 +167,7 @@ void GraphDlg::replot()
161167 bool rangeFound;
162168 QCPRange range = ui->plot ->graph ()->getKeyRange (rangeFound);
163169
164- DataPoint point;
170+ DataPoint point { 0 ., 0 .} ;
165171
166172 if ( initial && q[0 ]->pop (point) ) {
167173 initial = false ;
@@ -170,7 +176,7 @@ void GraphDlg::replot()
170176
171177 int i = 0 ;
172178 double fac;
173- double tNow;
179+ double tNow = 0 . ;
174180 for ( auto &queue : q ) {
175181 if ( Graphp[i].isVoltage )
176182 fac = 1e3 ;
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ public slots:
4141 void startPlotting (DCThread *);
4242 void stopPlotting ();
4343 void reloadGraphs ();
44+ void reject ();
4445};
4546
4647#endif
You can’t perform that action at this time.
0 commit comments