[niepce] Issue #38 - Fix the destruction order for SelectionController lifetime



commit 6f0d1d4a8eda806bb29ed9b89df819b05c1883c4
Author: Hubert Figuière <hub figuiere net>
Date:   Mon Dec 30 17:39:44 2019 -0500

    Issue #38 - Fix the destruction order for SelectionController lifetime
    
    - This fixes a crash when quitting

 src/niepce/ui/moduleshell.hpp  | 2 +-
 src/niepce/ui/niepcewindow.hpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/niepce/ui/moduleshell.hpp b/src/niepce/ui/moduleshell.hpp
index e8e73ab..44dde51 100644
--- a/src/niepce/ui/moduleshell.hpp
+++ b/src/niepce/ui/moduleshell.hpp
@@ -106,6 +106,7 @@ protected:
 private:
     libraryclient::LibraryClientPtr m_libraryclient;
     Glib::RefPtr<Gio::SimpleActionGroup> m_actionGroup;
+    ui::SelectionController::Ptr  m_selection_controller;
     std::map<std::string, ILibraryModule::Ptr> m_modules;
 
     // managed widgets...
@@ -113,7 +114,6 @@ private:
     Glib::RefPtr<Gio::Menu>       m_menu;
     Glib::RefPtr<Gio::Menu>       m_module_menu;
 
-    ui::SelectionController::Ptr  m_selection_controller;
     // these should be dynamic
     GridViewModule::Ptr           m_gridview;
     dr::DarkroomModule::Ptr       m_darkroom;
diff --git a/src/niepce/ui/niepcewindow.hpp b/src/niepce/ui/niepcewindow.hpp
index 88797cd..6c0b6af 100644
--- a/src/niepce/ui/niepcewindow.hpp
+++ b/src/niepce/ui/niepcewindow.hpp
@@ -77,11 +77,11 @@ private:
     void _createModuleShell();
 
     niepce::NotificationCenter::Ptr m_notifcenter;
+    ModuleShell::Ptr               m_moduleshell; // the main views stacked.
 
     Gtk::Box                       m_vbox;
     Gtk::Paned                     m_hbox;
     Glib::RefPtr<Gio::Menu>        m_main_menu;
-    ModuleShell::Ptr               m_moduleshell; // the main views stacked.
     WorkspaceController::Ptr       m_workspacectrl;
     FilmStripController::Ptr       m_filmstrip;
     Gtk::Statusbar                 m_statusBar;


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