WIP: Transformations of an instance in world coordinate system

from the side panel.
This commit is contained in:
bubnikv 2019-04-24 11:01:59 +02:00
parent 2088abdc31
commit 5d2537af35
9 changed files with 134 additions and 207 deletions

View file

@ -15,19 +15,7 @@ namespace Slic3r { namespace GUI {
wxString double_to_string(double const value, const int max_precision /*= 4*/)
{
if (value - int(value) == 0)
return wxString::Format(_T("%i"), int(value));
int precision = max_precision;
for (size_t p = 1; p < max_precision; p++)
{
double cur_val = pow(10, p)*value;
if (cur_val - int(cur_val) == 0) {
precision = p;
break;
}
}
return wxNumberFormatter::ToString(value, precision, wxNumberFormatter::Style_None);
return wxNumberFormatter::ToString(value, max_precision, wxNumberFormatter::Style_NoTrailingZeroes);
}
void Field::PostInitialize()