src/gui_editactions.cpp

changeset 286
7a562bf3d829
parent 283
c5401af41685
child 312
97620579d86c
equal deleted inserted replaced
285:836e77323ab0 286:7a562bf3d829
171 // If it was not possible to replace everything, inform the user. 171 // If it was not possible to replace everything, inform the user.
172 if (fails.size() > 0) { 172 if (fails.size() > 0) {
173 str errmsg = fmt ("Couldn't replace %lu radials as replacement subfiles could not be loaded:<br />", (ulong)fails.size ()); 173 str errmsg = fmt ("Couldn't replace %lu radials as replacement subfiles could not be loaded:<br />", (ulong)fails.size ());
174 174
175 for (str& fail : fails) 175 for (str& fail : fails)
176 errmsg += fmt ("* %s<br />", fail.chars ()); 176 errmsg += fmt ("* %1<br />", fail);
177 177
178 critical (errmsg); 178 critical (errmsg);
179 } 179 }
180 180
181 g_win->fullRefresh (); 181 g_win->fullRefresh ();
514 514
515 for (LDObject* obj : g_win->sel ()) 515 for (LDObject* obj : g_win->sel ())
516 for (short i = 0; i < obj->vertices (); ++i) { 516 for (short i = 0; i < obj->vertices (); ++i) {
517 vertex v = obj->getVertex (i); 517 vertex v = obj->getVertex (i);
518 518
519 for (const Axis ax : g_Axes) 519 for (const Axis ax : g_Axes) {
520 v[ax] = atof (fmt ("%.3f", v[ax])); 520 // HACK: :p
521 char valstr[64];
522 sprintf (valstr, "%.3f", v[ax]);
523 v[ax] = atof (valstr);
524 }
521 525
522 obj->setVertex (i, v); 526 obj->setVertex (i, v);
523 } 527 }
524 528
525 g_win->fullRefresh (); 529 g_win->fullRefresh ();

mercurial