[chronojump] RaceAnalyzer analyze options close -> returns to previous page (not always current set)



commit eb43afa6f595048d6f17ce8294ef8fd627173211
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Feb 18 16:52:17 2022 +0100

    RaceAnalyzer analyze options close -> returns to previous page (not always current set)

 src/gui/app1/runEncoderAnalyze.cs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/app1/runEncoderAnalyze.cs b/src/gui/app1/runEncoderAnalyze.cs
index 54257d601..6525331a0 100644
--- a/src/gui/app1/runEncoderAnalyze.cs
+++ b/src/gui/app1/runEncoderAnalyze.cs
@@ -129,9 +129,12 @@ public partial class ChronoJumpWindow
        }
 
        private bool button_run_encoder_analyze_analyze_was_sensitive; //needed this temp variable
+       private int notebook_run_encoder_analyze_coming_page; //needed this temp variable
        private void on_button_run_encoder_analyze_options_clicked (object o, EventArgs args)
        {
+               notebook_run_encoder_analyze_coming_page = 
Convert.ToInt32(notebook_run_encoder_analyze.CurrentPage);
                notebook_run_encoder_analyze.CurrentPage = 
Convert.ToInt32(notebook_run_encoder_analyze_pages.OPTIONS);
+
                hbox_run_encoder_analyze_top_modes.Sensitive = false;
                runEncoderButtonsSensitive(false);
 
@@ -177,7 +180,7 @@ public partial class ChronoJumpWindow
 
                // 2 change sensitivity of widgets
 
-               notebook_run_encoder_analyze.CurrentPage = 
Convert.ToInt32(notebook_run_encoder_analyze_pages.CURRENTSET);
+               notebook_run_encoder_analyze.CurrentPage = notebook_run_encoder_analyze_coming_page;
                runEncoderButtonsSensitive(true);
                button_run_encoder_analyze_analyze.Sensitive = 
button_run_encoder_analyze_analyze_was_sensitive;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]