[chronojump] When importing a session: reloads the session.
- From: Carles Pina i Estany <carlespina src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] When importing a session: reloads the session.
- Date: Wed, 9 Nov 2016 17:34:42 +0000 (UTC)
commit 27add4c2799b52b79abc5672c0070edbb191a9b7
Author: Carles Pina i Estany <carles pina cat>
Date: Wed Nov 9 18:30:29 2016 +0100
When importing a session: reloads the session.
Previously, after importing a session into an open session the names of
the "Persons" were not refreshed (and probably other things). Instead of
fixing each combo-box/UI at at time it reloads the session.
src/gui/chronojump.cs | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index b9a5f55..957b2d5 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -2339,6 +2339,8 @@ public partial class ChronoJumpWindow
//update stats combos
updateComboStats ();
+ reloadSession ();
+
chronojumpImporter.showImportCorrectlyFinished ();
} else {
LogB.Debug ("Chronojump Importer error: ", result.error);
@@ -2427,6 +2429,21 @@ public partial class ChronoJumpWindow
sensitiveGuiNoSession();
}
+ private void reloadSession()
+ {
+ // If there is an opened session it reloads it. Otherwise it does nothing.
+
+ if (currentSession != null) {
+ LogB.Information ("Reloading a session");
+ Session openedSession = currentSession;
+ closeSession ();
+ currentSession = openedSession;
+ on_load_session_accepted ();
+ } else {
+ LogB.Information ("Reload session but no session was opened: doing nothing");
+ }
+ }
+
private void on_export_session_activate(object o, EventArgs args) {
ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Encoder data will not be
exported."), "", "");
confirmWin.Button_accept.Clicked += new EventHandler(on_export_session_accepted);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]