From 99c44f4ef845237618b78be94952c52dc06c28bb Mon Sep 17 00:00:00 2001 From: Alfonso Gregory Date: Wed, 14 Jul 2021 20:05:12 -0400 Subject: [PATCH] Update Grapher.cpp --- src/GraphControl/Control/Grapher.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/GraphControl/Control/Grapher.cpp b/src/GraphControl/Control/Grapher.cpp index 564188e4..b01f56d5 100644 --- a/src/GraphControl/Control/Grapher.cpp +++ b/src/GraphControl/Control/Grapher.cpp @@ -231,14 +231,10 @@ namespace GraphControl { return; } - bool keepCurrentView = true; // If the equation has changed, the IsLineEnabled state is reset. // This checks if the equation has been reset and sets keepCurrentView to false in this case. - if (!equation->HasGraphError && !equation->IsValidated && equation->IsLineEnabled) - { - keepCurrentView = false; - } + const bool keepCurrentView = equation->HasGraphError || equation->IsValidated || !equation->IsLineEnabled) PlotGraph(keepCurrentView); }