From 2979a2e4d8f24d28e50e80636b5cd09ed0fc56a0 Mon Sep 17 00:00:00 2001 From: pojienie Date: Jan 31 2020 12:13:19 +0000 Subject: save snap options in control point editor tool --- diff --git a/toonz/sources/tnztools/controlpointeditortool.cpp b/toonz/sources/tnztools/controlpointeditortool.cpp index c9ccbbd..a720c7d 100644 --- a/toonz/sources/tnztools/controlpointeditortool.cpp +++ b/toonz/sources/tnztools/controlpointeditortool.cpp @@ -28,6 +28,8 @@ using namespace ToolUtils; TEnv::IntVar AutoSelectDrawing("ControlPointEditorToolAutoSelectDrawing", 1); +TEnv::IntVar Snap("ControlPointEditorToolSnap", 0); +TEnv::IntVar SnapSensitivity("ControlPointEditorToolSnapSensitivity", 0); //----------------------------------------------------------------------------- @@ -873,6 +875,8 @@ void ControlPointEditorTool::onLeave() { bool ControlPointEditorTool::onPropertyChanged(std::string propertyName) { AutoSelectDrawing = (int)(m_autoSelectDrawing.getValue()); + Snap = (int)(m_snap.getValue()); + SnapSensitivity = (int)(m_snapSensitivity.getIndex()); return true; } @@ -881,6 +885,8 @@ bool ControlPointEditorTool::onPropertyChanged(std::string propertyName) { void ControlPointEditorTool::onActivate() { // TODO: getApplication()->editImageOrSpline(); m_autoSelectDrawing.setValue(AutoSelectDrawing ? 1 : 0); + m_snap.setValue(Snap ? 1 : 0); + m_snapSensitivity.setIndex(SnapSensitivity); m_controlPointEditorStroke.setStroke((TVectorImage *)0, -1); m_draw = true; }