diff main/MainWindow.h @ 232:99e0dfd3ea75

* Various fixes to object lifetime management, particularly in the spectrum layer and for notification of main model deletion. The main purpose of this is to improve the behaviour of the spectrum, but I think it may also help with #1840922 Various crashes in Layer Summary window.
author Chris Cannam
date Wed, 23 Jan 2008 15:43:27 +0000
parents 718aaac046e7
children 5544593dd850
line wrap: on
line diff
--- a/main/MainWindow.h	Wed Jan 23 11:38:34 2008 +0000
+++ b/main/MainWindow.h	Wed Jan 23 15:43:27 2008 +0000
@@ -202,29 +202,29 @@
 
     KeyReference            *m_keyReference;
 
-    struct PaneConfiguration {
-	PaneConfiguration(LayerFactory::LayerType _layer
+    struct LayerConfiguration {
+	LayerConfiguration(LayerFactory::LayerType _layer
 			                       = LayerFactory::TimeRuler,
-                          Model *_source = 0,
-			  int _channel = -1) :
+                           Model *_source = 0,
+                           int _channel = -1) :
 	    layer(_layer), sourceModel(_source), channel(_channel) { }
 	LayerFactory::LayerType layer;
         Model *sourceModel;
 	int channel;
     };
 
-    typedef std::map<QAction *, PaneConfiguration> PaneActionMap;
+    typedef std::map<QAction *, LayerConfiguration> PaneActionMap;
     PaneActionMap m_paneActions;
 
+    typedef std::map<QAction *, LayerConfiguration> LayerActionMap;
+    LayerActionMap m_layerActions;
+
     typedef std::map<QAction *, TransformId> TransformActionMap;
     TransformActionMap m_transformActions;
 
     typedef std::map<TransformId, QAction *> TransformActionReverseMap;
     TransformActionReverseMap m_transformActionsReverse;
 
-    typedef std::map<QAction *, LayerFactory::LayerType> LayerActionMap;
-    LayerActionMap m_layerActions;
-
     typedef std::map<QAction *, Layer *> ExistingLayerActionMap;
     ExistingLayerActionMap m_existingLayerActions;
     ExistingLayerActionMap m_sliceActions;
@@ -245,7 +245,7 @@
     virtual void setupExistingLayersMenus();
     virtual void setupToolbars();
 
-    virtual void addPane(const PaneConfiguration &configuration, QString text);
+    virtual void addPane(const LayerConfiguration &configuration, QString text);
 
     virtual void closeEvent(QCloseEvent *e);
     virtual bool checkSaveModified();