Use the existing layers_to_create() method rather than reimplementing it.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 1 Apr 2008 17:51:18 +0000 (17:51 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 1 Apr 2008 17:51:18 +0000 (17:51 +0000)
git-svn-id: http://svn.voria.com/code@1951 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/state_bline.cpp

index a7ee701..5fcba88 100644 (file)
@@ -608,11 +608,7 @@ StateBLine_Context::run_()
                synfigapp::SelectionManager::LayerList layer_selection;
 
                // count how many layers we're going to be creating
-               int layers_to_create = 0;
-               if (get_layer_curve_gradient_flag())    layers_to_create++;
-               if (get_layer_plant_flag())                             layers_to_create++;
-               if (get_layer_region_flag())                    layers_to_create++;
-               if (get_layer_outline_flag())                   layers_to_create++;
+               int layers_to_create = this->layers_to_create();
 
                ///////////////////////////////////////////////////////////////////////////
                //   C U R V E   G R A D I E N T