From 65a7c2bc5d60469f5290c764cbce3c2e74d83020 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 5 Dec 2008 16:37:31 +0000 Subject: [PATCH] removed now useless ArrowSizeProportional --- Common/DefaultOptions.h | 2 -- Common/Options.cpp | 17 ----------------- Common/Options.h | 1 - Fltk/optionWindow.cpp | 12 ------------ Graphics/drawPost.cpp | 5 ++--- Post/PViewOptions.h | 2 +- doc/texinfo/opt_view.texi | 5 ----- 7 files changed, 3 insertions(+), 41 deletions(-) diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 72e4730c62..1fff3a063f 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -1199,8 +1199,6 @@ StringXNumber ViewOptions_Number[] = { "Maximum display size of arrows (in pixels)" }, { F|O, "ArrowSizeMin" , opt_view_arrow_size_min , 0. , "Minimum display size of arrows (in pixels)" }, - { F|O, "ArrowSizeProportional" , opt_view_arrow_size_proportional , 1. , - "Scale the arrows according to the norm of the vector" }, { F|O, "ArrowStemLength" , opt_view_arrow_stem_length , 0.56 , "Relative length of arrow stem" }, { F|O, "ArrowStemRadius" , opt_view_arrow_stem_radius , 0.02 , diff --git a/Common/Options.cpp b/Common/Options.cpp index 314c8792a1..860713e18e 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -6413,23 +6413,6 @@ double opt_view_arrow_size_max(OPT_ARGS_NUM) #endif } -double opt_view_arrow_size_proportional(OPT_ARGS_NUM) -{ -#if !defined(HAVE_NO_POST) - GET_VIEW(0.); - if(action & GMSH_SET) { - opt->ArrowSizeProportional = (int)val; - } -#if defined(HAVE_FLTK) - if(_gui_action_valid(action, num)) - GUI::instance()->options->view.butt[0]->value(opt->ArrowSizeProportional); -#endif - return opt->ArrowSizeProportional; -#else - return 0.; -#endif -} - double opt_view_arrow_head_radius(OPT_ARGS_NUM) { #if !defined(HAVE_NO_POST) diff --git a/Common/Options.h b/Common/Options.h index 9cdc3bd2ff..f30ab6a9b1 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -581,7 +581,6 @@ double opt_view_transform21(OPT_ARGS_NUM); double opt_view_transform22(OPT_ARGS_NUM); double opt_view_arrow_size_min(OPT_ARGS_NUM); double opt_view_arrow_size_max(OPT_ARGS_NUM); -double opt_view_arrow_size_proportional(OPT_ARGS_NUM); double opt_view_arrow_head_radius(OPT_ARGS_NUM); double opt_view_arrow_stem_length(OPT_ARGS_NUM); double opt_view_arrow_stem_radius(OPT_ARGS_NUM); diff --git a/Fltk/optionWindow.cpp b/Fltk/optionWindow.cpp index 6c7de47c27..c10b7678ac 100644 --- a/Fltk/optionWindow.cpp +++ b/Fltk/optionWindow.cpp @@ -640,7 +640,6 @@ static void view_options_ok_cb(Fl_Widget *w, void *data) double timestep = opt_view_timestep(current, GMSH_GET, 0); double arrow_size_min = opt_view_arrow_size_min(current, GMSH_GET, 0); double arrow_size_max = opt_view_arrow_size_max(current, GMSH_GET, 0); - double arrow_size_proportional = opt_view_arrow_size_proportional(current, GMSH_GET, 0); double displacement_factor = opt_view_displacement_factor(current, GMSH_GET, 0); double point_size = opt_view_point_size(current, GMSH_GET, 0); double line_width = opt_view_line_width(current, GMSH_GET, 0); @@ -755,10 +754,6 @@ static void view_options_ok_cb(Fl_Widget *w, void *data) // view_butts - val = o->view.butt[0]->value(); - if(force || (val != arrow_size_proportional)) - opt_view_arrow_size_proportional(i, GMSH_SET, val); - val = o->view.butt[38]->value(); if(force || (val != saturate_values)) opt_view_saturate_values(i, GMSH_SET, val); @@ -2889,12 +2884,6 @@ optionWindow::optionWindow(int fontsize) : _fontsize(fontsize) view.value[60]->align(FL_ALIGN_RIGHT); view.value[60]->callback(view_options_ok_cb); - view.butt[0] = new Fl_Check_Button - (L + width - (int)(1.15*BB) - 2 * WB, 2 * WB + 7 * BH, (int)(1.15*BB), BH, - "Proportional"); - view.butt[0]->type(FL_TOGGLE_BUTTON); - view.butt[0]->callback(view_options_ok_cb); - view.value[63] = new Fl_Value_Input (L + 2 * WB, 2 * WB + 8 * BH, IW, BH, "Displacement factor"); view.value[63]->minimum(0.); @@ -3252,7 +3241,6 @@ void optionWindow::updateViewGroup(int index) opt_view_vector_type(index, GMSH_GUI, 0); opt_view_arrow_size_min(index, GMSH_GUI, 0); opt_view_arrow_size_max(index, GMSH_GUI, 0); - opt_view_arrow_size_proportional(index, GMSH_GUI, 0); opt_view_displacement_factor(index, GMSH_GUI, 0); double val3 = 2. * CTX.lc / maxval; diff --git a/Graphics/drawPost.cpp b/Graphics/drawPost.cpp index 0ab693e9a7..61f8e41f20 100644 --- a/Graphics/drawPost.cpp +++ b/Graphics/drawPost.cpp @@ -1072,13 +1072,12 @@ static void drawVectorArray(drawContext *ctx, PView *p, VertexArray *va) float *v = va->getVertexArray(3 * (i + 1)); glColor4ubv((GLubyte *)va->getColorArray(4 * i)); double l = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - double lmax = opt->ArrowSizeProportional ? opt->TmpMax : l; + double lmax = opt->TmpMax; if((l || opt->VectorType == 6) && lmax){ double scale = (opt->ArrowSizeMax - opt->ArrowSizeMin) / lmax; // log scaling if(opt->ScaleType == PViewOptions::Logarithmic && - opt->ArrowSizeProportional && opt->TmpMin > 0 && - opt->TmpMax > opt->TmpMin && l != opt->TmpMin){ + opt->TmpMin > 0 && opt->TmpMax > opt->TmpMin && l != opt->TmpMin){ scale = (opt->ArrowSizeMax - opt->ArrowSizeMin) / l * log10(l / opt->TmpMin) / log10(opt->TmpMax / opt->TmpMin); } diff --git a/Post/PViewOptions.h b/Post/PViewOptions.h index adb3420c13..b5bad9eae9 100644 --- a/Post/PViewOptions.h +++ b/Post/PViewOptions.h @@ -62,7 +62,7 @@ class PViewOptions { double ArrowSizeMin, ArrowSizeMax; double ArrowRelHeadRadius, ArrowRelStemRadius, ArrowRelStemLength; double Normals, Tangents; - int Visible, IntervalsType, NbIso, ArrowSizeProportional; + int Visible, IntervalsType, NbIso; int Light, LightTwoSide, LightLines, SmoothNormals; double AngleSmoothNormals; int SaturateValues, FakeTransparency; diff --git a/doc/texinfo/opt_view.texi b/doc/texinfo/opt_view.texi index 5928c2e5f7..3b2c547d0c 100644 --- a/doc/texinfo/opt_view.texi +++ b/doc/texinfo/opt_view.texi @@ -134,11 +134,6 @@ Minimum display size of arrows (in pixels)@* Default value: @code{0}@* Saved in: @code{General.OptionsFileName} -@item View.ArrowSizeProportional -Scale the arrows according to the norm of the vector@* -Default value: @code{1}@* -Saved in: @code{General.OptionsFileName} - @item View.ArrowStemLength Relative length of arrow stem@* Default value: @code{0.56}@* -- GitLab