OpenToonz - An open-source full-featured 2D animation creation software
C
fix plastictool tooloption crash
shun_iwasawaeaa9f3875f37
diff --git a/toonz/sources/tnztools/plastictool.cpp b/toonz/sources/tnztools/plastictool.cppindex c877c3cb3..93f7a30c9 100644--- a/toonz/sources/tnztools/plastictool.cpp+++ b/toonz/sources/tnztools/plastictool.cpp@@ -387,8 +387,10 @@ void PlasticToolOptionsBox::SkelIdsComboBox::updateCurrentSkeleton() {//****************************************************************************************PlasticToolOptionsBox::PlasticToolOptionsBox(QWidget *parent, TTool *tool,- TPaletteHandle *pltHandle)- : GenericToolOptionsBox(parent, tool, pltHandle, PlasticTool::MODES_COUNT)+ TPaletteHandle *pltHandle,+ ToolHandle *toolHandle)+ : GenericToolOptionsBox(parent, tool, pltHandle, PlasticTool::MODES_COUNT,+ toolHandle), m_tool(tool), m_subToolbars(new GenericToolOptionsBox *[PlasticTool::MODES_COUNT])//, m_subToolbarActions(new QAction*[PlasticTool::MODES_COUNT])@@ -721,8 +723,9 @@ ToolOptionsBox *PlasticTool::createOptionsBox() {// Create the options boxTPaletteHandle *currPalette =TTool::getApplication()->getPaletteController()->getCurrentLevelPalette();+ ToolHandle *currTool = m_application->getCurrentTool();PlasticToolOptionsBox *optionsBox =- new PlasticToolOptionsBox(0, this, currPalette);+ new PlasticToolOptionsBox(0, this, currPalette, currTool);// Connect it to receive m_mode notificationsm_mode.addListener(optionsBox);diff --git a/toonz/sources/tnztools/plastictool.h b/toonz/sources/tnztools/plastictool.hindex 0b5b807ad..51be286cc 100644--- a/toonz/sources/tnztools/plastictool.h+++ b/toonz/sources/tnztools/plastictool.h@@ -402,8 +402,8 @@ class PlasticToolOptionsBox final : public GenericToolOptionsBox,Q_OBJECTpublic:- PlasticToolOptionsBox(QWidget *parent, TTool *tool,- TPaletteHandle *pltHandle);+ PlasticToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle,+ ToolHandle *toolHandle);private:class SkelIdsComboBox;