From 3347d55d0ad274361b133725c97b1342eb1d0a51 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Thu, 22 Oct 2015 22:30:19 +0000 Subject: [PATCH] Bug fix for updateAutoParse(): from prism-games. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10826 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/userinterface/model/GUIMultiModelHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/prism/src/userinterface/model/GUIMultiModelHandler.java b/prism/src/userinterface/model/GUIMultiModelHandler.java index 90129321..8588c495 100644 --- a/prism/src/userinterface/model/GUIMultiModelHandler.java +++ b/prism/src/userinterface/model/GUIMultiModelHandler.java @@ -929,9 +929,12 @@ public class GUIMultiModelHandler extends JPanel implements PrismModelListener */ public synchronized void updateAutoParse() { + // Store existing status + boolean autoParseOld = autoParse; + // Is auto-parse switched on? autoParse = theModel.getPrism().getSettings().getBoolean(PrismSettings.MODEL_AUTO_PARSE); - + // Should we disable auto parsing? (if the model is too big and that option is not disabled) if (isSwitchOnLarge() && autoParse) { if (currentMode == PRISM_MODE || currentMode == PEPA_MODE) { @@ -943,7 +946,7 @@ public class GUIMultiModelHandler extends JPanel implements PrismModelListener } // If the flag has just been switched ON, do a parse... - if (autoParse) { + if (!autoParseOld && autoParse) { tree.makeNotUpToDate(); theModel.notifyEventListeners(new GUIModelEvent(GUIModelEvent.MODIFIED_SINCE_SAVE)); if (!parsing) {