Commit 1570954d authored by Andreas Kempe's avatar Andreas Kempe

Rewrote the user settings assignment.

parent 5c54a037
......@@ -187,34 +187,13 @@ void main_window::handle_update_settings()
{
settings_dialog->hide();
for (short i = 0; i < 7; ++i)
{
double value = field_list[i]->text().toDouble();
switch (i)
{
case 0:
render_settings.re_max = value;
break;
case 1:
render_settings.re_min = value;
break;
case 2:
render_settings.im_max = value;
break;
case 3:
render_settings.im_min = value;
break;
case 4:
render_settings.img_width = value;
break;
case 5:
render_settings.img_height = value;
break;
case 6:
render_settings.iterations = value;
break;
}
}
render_settings.re_max = field_list[0]->text().toDouble();
render_settings.re_min = field_list[1]->text().toDouble();
render_settings.im_max = field_list[2]->text().toDouble();
render_settings.im_min = field_list[3]->text().toDouble();
render_settings.img_width = field_list[4]->text().toULong();
render_settings.img_height = field_list[5]->text().toULong();
render_settings.iterations = field_list[6]->text().toULong();
delete mandel_image;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment