Changeset View
Changeset View
Standalone View
Standalone View
libs/widgetutils/kis_spin_box_unit_manager.cpp
Show First 20 Lines • Show All 362 Lines • ▼ Show 20 Line(s) | 362 | if (symbol == "px") { | |||
---|---|---|---|---|---|
363 | break; | 363 | break; | ||
364 | } | 364 | } | ||
365 | 365 | | |||
366 | bool ok; | 366 | bool ok; | ||
367 | KoUnit unit = KoUnit::fromSymbol(symbol, &ok); | 367 | KoUnit unit = KoUnit::fromSymbol(symbol, &ok); | ||
368 | if (! ok) { | 368 | if (! ok) { | ||
369 | break; | 369 | break; | ||
370 | } | 370 | } | ||
371 | factor = unit.ptToUnit(1.0, unit); // use the precise function | 371 | factor = unit.toUserValuePrecise(1.0); // use the precise function | ||
372 | } while (0) ; | 372 | } while (0) ; | ||
373 | break; | 373 | break; | ||
374 | 374 | | |||
375 | case IMLENGTH: | 375 | case IMLENGTH: | ||
376 | if (symbol == "px") { | 376 | if (symbol == "px") { | ||
377 | factor = 1; | 377 | factor = 1; | ||
378 | } | 378 | } | ||
379 | break; | 379 | break; | ||
▲ Show 20 Lines • Show All 250 Lines • Show Last 20 Lines |