Skip to content

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

C

fix tooloption checkbox

shun_iwasawaa39cc71201b7
diff --git a/toonz/sources/tnztools/tooloptionscontrols.cpp b/toonz/sources/tnztools/tooloptionscontrols.cpp
index ece372e72..c62dbed42 100644
--- a/toonz/sources/tnztools/tooloptionscontrols.cpp
+++ b/toonz/sources/tnztools/tooloptionscontrols.cpp
@@ -114,6 +114,14 @@ void ToolOptionCheckbox::updateStatus() {
//-----------------------------------------------------------------------------
+void ToolOptionCheckbox::nextCheckState() {
+ QAbstractButton::nextCheckState();
+ m_property->setValue(checkState() == Qt::Checked);
+ notifyTool();
+}
+
+//-----------------------------------------------------------------------------
+
void ToolOptionCheckbox::doClick(bool checked) {
if (m_toolHandle && m_toolHandle->getTool() != m_tool) return;
// active only if the belonging combo-viewer is visible
diff --git a/toonz/sources/tnztools/tooloptionscontrols.h b/toonz/sources/tnztools/tooloptionscontrols.h
index b446e88a4..c55f41701 100644
--- a/toonz/sources/tnztools/tooloptionscontrols.h
+++ b/toonz/sources/tnztools/tooloptionscontrols.h
@@ -94,6 +94,9 @@ public:
void updateStatus() override;
public slots:
void doClick(bool);
+
+protected:
+ void nextCheckState() override;
};
//-----------------------------------------------------------------------------