Fix zeroing n param when running <data clear>

This commit is contained in:
iceman1001
2021-08-01 17:14:06 +02:00
parent c1cc62ca5f
commit 65387f7cd3
4 changed files with 3 additions and 3 deletions

View File

@@ -43,6 +43,7 @@ size_t ClearGraph(bool redraw) {
size_t gtl = GraphTraceLen;
memset(GraphBuffer, 0x00, GraphTraceLen);
GraphTraceLen = 0;
GraphStop = 0;
if (redraw)
RepaintGraphWindow();
return gtl;

View File

@@ -35,7 +35,7 @@ void ExitGraphics(void);
extern double CursorScaleFactor;
extern char CursorScaleFactorUnit[11];
extern double PlotGridX, PlotGridY, PlotGridXdefault, PlotGridYdefault, GridOffset;
extern uint32_t CursorCPos, CursorDPos;
extern uint32_t CursorCPos, CursorDPos, GraphStop;
extern int CommandFinished;
extern int offline;
extern bool GridLocked;

View File

@@ -33,7 +33,6 @@ class Plot: public QWidget {
private:
QWidget *master;
uint32_t GraphStart; // Starting point/offset for the left side of the graph
uint32_t GraphStop; // Stop point/offset for the right side of the graph
double GraphPixelsPerPoint; // How many visual pixels are between each sample point (x axis)
uint32_t CursorAPos;
uint32_t CursorBPos;

View File

@@ -44,7 +44,7 @@ session_arg_t session;
double CursorScaleFactor = 1;
char CursorScaleFactorUnit[11] = {0};
double PlotGridX = 0, PlotGridY = 0, PlotGridXdefault = 64, PlotGridYdefault = 64;
uint32_t CursorCPos = 0, CursorDPos = 0;
uint32_t CursorCPos = 0, CursorDPos = 0, GraphStop = 0;
double GraphPixelsPerPoint = 1.f; // How many visual pixels are between each sample point (x axis)
static bool flushAfterWrite = 0;
double GridOffset = 0;