Prevent GraphStart change on empty plot

This commit is contained in:
Philippe Teuwen 2021-08-01 22:26:16 +02:00
commit 085aa819dc

View file

@ -816,6 +816,7 @@ void Plot::Zoom(double factor, uint32_t refX) {
} }
void Plot::Move(int offset) { void Plot::Move(int offset) {
if (GraphTraceLen == 0) return;
if (offset > 0) { // Move right if (offset > 0) { // Move right
if (GraphPixelsPerPoint < 20) { if (GraphPixelsPerPoint < 20) {
GraphStart += offset; GraphStart += offset;