diff --git a/toonz/sources/tnztools/toonzvectorbrushtool.cpp b/toonz/sources/tnztools/toonzvectorbrushtool.cpp index c539159..0a54da8 100644 --- a/toonz/sources/tnztools/toonzvectorbrushtool.cpp +++ b/toonz/sources/tnztools/toonzvectorbrushtool.cpp @@ -625,6 +625,12 @@ void ToonzVectorBrushTool::onDeactivate() { /*--- * �h���b�O���Ƀc�[�����؂�ւ�����ꍇ�ɔ����AonDeactivate�ɂ�MouseRelease�Ɠ����������s�� * ---*/ + + // End current stroke. + if (m_active && m_enabled) { + leftButtonUp(m_lastDragPos, m_lastDragEvent); + } + if (m_tileSaver && !m_isPath) { m_enabled = false; } @@ -718,6 +724,10 @@ void ToonzVectorBrushTool::leftButtonDrag(const TPointD &pos, m_brushPos = m_mousePos = pos; return; } + + m_lastDragPos = pos; + m_lastDragEvent = e; + double thickness = (m_pressure.getValue() || m_isPath) ? computeThickness(e.m_pressure, m_thickness, m_isPath) : m_thickness.getValue().second * 0.5; diff --git a/toonz/sources/tnztools/toonzvectorbrushtool.h b/toonz/sources/tnztools/toonzvectorbrushtool.h index 887da39..21fad23 100644 --- a/toonz/sources/tnztools/toonzvectorbrushtool.h +++ b/toonz/sources/tnztools/toonzvectorbrushtool.h @@ -192,6 +192,9 @@ protected: ��ƒ���FrameId���N���b�N���ɕۑ����A�}�E�X�����[�X���iUndo�̓o�^���j�ɕʂ̃t���[���� �ړ����Ă����Ƃ��̕s����C������B---*/ TFrameId m_workingFrameId; + + TPointD m_lastDragPos; //!< Position where mouse was last dragged. + TMouseEvent m_lastDragEvent; //!< Previous mouse-drag event. }; #endif // TOONZVECTORBRUSHTOOL_H