src/miscallenous.cpp

changeset 1215
77a0270352a3
parent 1012
413ecd6b9801
child 1217
314e12e23c3a
--- a/src/miscallenous.cpp	Thu Jan 04 19:24:40 2018 +0200
+++ b/src/miscallenous.cpp	Thu Jan 04 19:40:16 2018 +0200
@@ -100,11 +100,11 @@
 
 float gridCoordinateSnap()
 {
-	switch (Config->grid())
+	switch (config.grid())
 	{
-	case Grid::Coarse: return Config->gridCoarseCoordinateSnap();
-	case Grid::Medium: return Config->gridMediumCoordinateSnap();
-	case Grid::Fine: return Config->gridFineCoordinateSnap();
+	case Grid::Coarse: return config.gridCoarseCoordinateSnap();
+	case Grid::Medium: return config.gridMediumCoordinateSnap();
+	case Grid::Fine: return config.gridFineCoordinateSnap();
 	}
 
 	return 1.0f;
@@ -112,11 +112,11 @@
 
 float gridAngleSnap()
 {
-	switch (Config->grid())
+	switch (config.grid())
 	{
-	case Grid::Coarse: return Config->gridCoarseAngleSnap();
-	case Grid::Medium: return Config->gridMediumAngleSnap();
-	case Grid::Fine: return Config->gridFineAngleSnap();
+	case Grid::Coarse: return config.gridCoarseAngleSnap();
+	case Grid::Medium: return config.gridMediumAngleSnap();
+	case Grid::Fine: return config.gridFineAngleSnap();
 	}
 
 	return 45.0f;
@@ -124,12 +124,12 @@
 
 float gridBezierCurveSegments()
 {
-	switch (Config->grid())
+	switch (config.grid())
 	{
 	default:
-	case Grid::Coarse: return Config->gridCoarseBezierCurveSegments();
-	case Grid::Medium: return Config->gridMediumBezierCurveSegments();
-	case Grid::Fine: return Config->gridFineBezierCurveSegments();
+	case Grid::Coarse: return config.gridCoarseBezierCurveSegments();
+	case Grid::Medium: return config.gridMediumBezierCurveSegments();
+	case Grid::Fine: return config.gridFineBezierCurveSegments();
 	}
 }
 
@@ -184,7 +184,7 @@
 //
 Vertex GetRotationPoint (const LDObjectList& objs)
 {
-	switch (RotationPoint (Config->rotationPointType()))
+	switch (RotationPoint (config.rotationPointType()))
 	{
 	case RotationPoint::ObjectOrigin:
 		{
@@ -206,7 +206,7 @@
 		return Origin;
 
 	case RotationPoint::CustomPoint:
-		return Config->customRotationPoint();
+		return config.customRotationPoint();
 
 	case RotationPoint::NumValues:
 		break;
@@ -223,7 +223,7 @@
 	Ui::RotPointUI ui;
 	ui.setupUi (dlg);
 
-	switch (RotationPoint (Config->rotationPointType()))
+	switch (RotationPoint (config.rotationPointType()))
 	{
 	case RotationPoint::ObjectOrigin:
 		ui.objectPoint->setChecked (true);
@@ -241,7 +241,7 @@
 		break;
 	}
 
-	Vertex custompoint = Config->customRotationPoint();
+	Vertex custompoint = config.customRotationPoint();
 	ui.customX->setValue (custompoint.x());
 	ui.customY->setValue (custompoint.y());
 	ui.customZ->setValue (custompoint.z());
@@ -249,7 +249,7 @@
 	if (not dlg->exec())
 		return;
 
-	Config->setRotationPointType (int (
+	config.setRotationPointType (int (
 		(ui.objectPoint->isChecked()) ? RotationPoint::ObjectOrigin :
 		(ui.worldPoint->isChecked())  ? RotationPoint::WorldOrigin :
 		RotationPoint::CustomPoint));
@@ -257,7 +257,7 @@
 	custompoint.setX (ui.customX->value());
 	custompoint.setY (ui.customY->value());
 	custompoint.setZ (ui.customZ->value());
-	Config->setCustomRotationPoint (custompoint);
+	config.setCustomRotationPoint (custompoint);
 }
 
 // =============================================================================

mercurial