From a65e29de5214c6bedd4dde5c37c5b8ecfbd1f43f Mon Sep 17 00:00:00 2001
From: Wojciech Wojnowski <wojciech.wojnowski@pg.edu.pl>
Date: Fri, 24 Apr 2020 12:05:58 +0000
Subject: [PATCH] Further modifications to the re-load function

---
 AGREE.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/AGREE.py b/AGREE.py
index 20eb383..6accd9b 100644
--- a/AGREE.py
+++ b/AGREE.py
@@ -273,6 +273,7 @@ weight_10 = IntVar()
 weight_11 = IntVar()
 weight_12 = IntVar()
 
+
 weight_1.set(2)
 weight_2.set(2)
 weight_3.set(2)
@@ -286,6 +287,7 @@ weight_10.set(2)
 weight_11.set(2)
 weight_12.set(2)
 
+
 # Begin with default values of variables to be able to generate the chart right away:
 var_1 = 1.0
 var_2 = 1.0
@@ -361,6 +363,14 @@ def resetAllValues():
     varE.set(0.0)
     varF.set(0.0)
     varG.set(0.0)
+    # re-load the inactive weight selection interfaces:
+    tabs = (tab1, tab2, tab3, tab4, tab5, tab6, tab7, tab8, tab9, tab10, tab11, tab12)
+    weights = (weight_1, weight_2, weight_3, weight_4, weight_5, weight_6, weight_7, weight_8, weight_9, weight_10, weight_11, weight_12)
+    weight_index = 0
+    for tab in tabs:
+        weightChoice(10, 0, tab, weights[weight_index])
+        weight_index += 1
+
     # re-draw the graph:
     chartPlotter()
 
-- 
GitLab