Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Move AutoClose Value to TEnv (#1467)

Jeremy Bullock1a58e5883a40
diff --git a/toonz/sources/common/tvectorimage/tl2lautocloser.cpp b/toonz/sources/common/tvectorimage/tl2lautocloser.cpp
index f7dbf98ee..5ed14af8f 100644
--- a/toonz/sources/common/tvectorimage/tl2lautocloser.cpp
+++ b/toonz/sources/common/tvectorimage/tl2lautocloser.cpp
@@ -3,12 +3,14 @@
#include "tl2lautocloser.h"
#include "tgl.h"
-
+#include "tenv.h"
#include "tvectorimage.h"
#include "tstroke.h"
#include <QDebug>
+TEnv::DoubleVar VectorCloseValue("VectorCloseValue", 5);
+
//=============================================================================
#ifdef _WIN32
@@ -107,7 +109,7 @@ struct StrokePointSet {
TStroke *stroke;
std::vector<StrokePoint> points;
StrokePointSet(TStroke *stroke_ = 0) : stroke(stroke_) {
- const double inc = 5;
+ const double inc = VectorCloseValue;
if (stroke_) {
double length = stroke->getLength();
double s = 0;