- string const width = fromqstr(widthED.text());
-
- if (widthUnitCO.currentIndex() > 0) {
- // Subtract one, because scale is 0.
- int const unit = widthUnitCO.currentIndex() - 1;
-
- Length w;
- if (isValidLength(width, &w))
- data.width = w;
- else if (isStrDbl(width))
- data.width = Length(convert<double>(width),
- static_cast<Length::UNIT>(unit));
- else
- data.width = Length();
-
- data.scale = string();
-
- } else {