Code

fix initialization order of FilterEffectDialog fields, per bug #249514
authormental <mental@users.sourceforge.net>
Thu, 17 Jul 2008 23:43:18 +0000 (23:43 +0000)
committermental <mental@users.sourceforge.net>
Thu, 17 Jul 2008 23:43:18 +0000 (23:43 +0000)
src/ui/dialog/filter-effects-dialog.cpp
src/ui/dialog/filter-effects-dialog.h

index 2cec40860dda09e9312b7f152401fec99a7503e4..836eb8fd4918f08b108a005772f76ac0bc6df867 100644 (file)
@@ -2086,15 +2086,15 @@ int FilterEffectsDialog::PrimitiveList::primitive_count() const
 
 FilterEffectsDialog::FilterEffectsDialog()
     : UI::Widget::Panel("", "dialogs.filtereffects", SP_VERB_DIALOG_FILTER_EFFECTS),
-      _filter_modifier(*this),
-      _primitive_list(*this),
       _add_primitive_type(FPConverter),
       _add_primitive(_("Add Effect:")),
       _empty_settings(_("No effect selected"), Gtk::ALIGN_LEFT),
       _no_filter_selected(_("No filter selected"), Gtk::ALIGN_LEFT),
       _settings_initialized(false),
       _locked(false),
-      _attr_lock(false)
+      _attr_lock(false),
+      _filter_modifier(*this),
+      _primitive_list(*this)
 {
     _settings = new Settings(*this, _settings_tab1, sigc::mem_fun(*this, &FilterEffectsDialog::set_attr_direct),
                              NR_FILTER_ENDPRIMITIVETYPE);
index 16d684dd48be4d21a21f392e3268576af51b7557..9e39de2bb4149b5b0b4da9898bd9c07671adc3d8 100644 (file)
@@ -223,16 +223,12 @@ private:
     void update_color_matrix();
     void update_primitive_infobox();
 
-    // Filter effect selection
-    FilterModifier _filter_modifier;
-
     // Primitives Info Box  
     Gtk::Label _infobox_desc;
     Gtk::Image _infobox_icon;
 
     // View/add primitives
     Gtk::VBox _primitive_box;
-    PrimitiveList _primitive_list;
     UI::Widget::ComboBoxEnum<NR::FilterPrimitiveType> _add_primitive_type;
     Gtk::Button _add_primitive;
 
@@ -268,6 +264,11 @@ private:
     bool _locked;
     bool _attr_lock;
 
+    // These go last since they depend on the prior initialization of
+    // other FilterEffectsDialog members
+    FilterModifier _filter_modifier;
+    PrimitiveList _primitive_list;
+
     FilterEffectsDialog(FilterEffectsDialog const &d);
     FilterEffectsDialog& operator=(FilterEffectsDialog const &d);
 };