[chronojump] Fixed delete-event on load window since import_session integration



commit f87ea49abfbff2eeaae9c441b739334e8a28e364
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Nov 29 14:42:40 2019 +0100

    Fixed delete-event on load window since import_session integration

 src/gui/session/load.cs | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/gui/session/load.cs b/src/gui/session/load.cs
index 183bc411..ad722436 100644
--- a/src/gui/session/load.cs
+++ b/src/gui/session/load.cs
@@ -648,14 +648,15 @@ public class SessionLoadWindow
        
        void on_session_load_delete_event (object o, DeleteEventArgs args)
        {
-               /*
-               SessionLoadWindowBox.session_load.Hide();
-               SessionLoadWindowBox = null;
-               */
-               //read fakeButton_cancel_maybeDatabaseSwitched comment on the top of this file
+               if (type == WindowType.LOAD_SESSION) {
+                       SessionLoadWindowBox.session_load.Hide();
+                       SessionLoadWindowBox = null;
+               } else {
+                       //read fakeButton_cancel_maybeDatabaseSwitched comment on the top of this file
 
-               args.RetVal = true;
-               fakeButton_cancel_maybeDatabaseSwitched.Click();
+                       args.RetVal = true;
+                       fakeButton_cancel_maybeDatabaseSwitched.Click();
+               }
        }
 
        public void HideAndNull()


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