diff options
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/mapping-dialog.cpp | 20 | 
1 files changed, 8 insertions, 12 deletions
| diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp index 8a5147cf..6dc6d15f 100644 --- a/gui/mapping-dialog.cpp +++ b/gui/mapping-dialog.cpp @@ -94,11 +94,11 @@ void mapping_dialog::load()          { nullptr, Yaw, nullptr, false }      }; -    ui.max_pitch_output->setItemData(0, int(axis_opts::o_r180)); -    ui.max_pitch_output->setItemData(1, int(axis_opts::o_r90)); -      using a = axis_opts::max_clamp; +    ui.max_pitch_output->setItemData(0, int(a::o_r180)); +    ui.max_pitch_output->setItemData(1, int(a::o_r90)); +      for (QComboBox* x : { ui.max_yaw_rotation, ui.max_pitch_rotation, ui.max_roll_rotation })          for (a y : { a::r180, a::r90, a::r60, a::r45, a::r30, a::r25, a::r20, a::r15, a::r10 })              x->addItem(tr("%1°").arg(y), y); @@ -107,8 +107,6 @@ void mapping_dialog::load()          for (a y : { a::t30, a::t20, a::t15, a::t10, a::t100 })              x->addItem(tr("%1 cm").arg(int(y)), y); -    // XXX TODO add tie_setting overload for spline_widget!!! -sh 20171020 -      for (int i = 0; qfcs[i].qfc; i++)      {          const bool altp = qfcs[i].altp; @@ -125,14 +123,12 @@ void mapping_dialog::load()              qfc.setEnabled(axis.opts.altp);          } -        using c = axis_opts::max_clamp; -          auto update_xstep = [&qfc](int clamp_x) {              int value; -            if (clamp_x <= c::r30) +            if (clamp_x <= a::r30)                  value = 1; -            else if (clamp_x <= c::r45) +            else if (clamp_x <= a::r45)                  value = 5;              else                  value = 10; @@ -145,11 +141,11 @@ void mapping_dialog::load()              switch (clamp_y)              {              default: -            case c::o_r180: +            case a::o_r180:                  value = 20; break; -            case c::o_r90: +            case a::o_r90:                  value = 10; break; -            case c::o_t75: +            case a::o_t75:                  value = 5; break;              }              qfc.set_y_step(value); | 
