Part: use UnitsApi::getDecimals in ShapeFromMesh dialog
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "ShapeFromMesh.h"
|
||||
#include "ui_ShapeFromMesh.h"
|
||||
#include <App/Application.h>
|
||||
#include <Base/UnitsApi.h>
|
||||
#include <App/DocumentObserver.h>
|
||||
#include <Gui/CommandT.h>
|
||||
#include <Gui/Selection.h>
|
||||
@@ -46,8 +46,7 @@ ShapeFromMesh::ShapeFromMesh(QWidget* parent, Qt::WindowFlags fl)
|
||||
|
||||
double STD_OCC_TOLERANCE = 1e-6;
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Units");
|
||||
int decimals = hGrp->GetInt("Decimals");
|
||||
int decimals = Base::UnitsApi::getDecimals();
|
||||
double tolerance_from_decimals = pow(10., -decimals);
|
||||
|
||||
double minimal_tolerance = tolerance_from_decimals < STD_OCC_TOLERANCE ? STD_OCC_TOLERANCE : tolerance_from_decimals;
|
||||
|
||||
Reference in New Issue
Block a user