OpenToonz - An open-source full-featured 2D animation creation software
C
Toggle Shortcut
Jeremy Bullockeccbe0c583fc
diff --git a/toonz/sources/toonz/frameheadgadget.cpp b/toonz/sources/toonz/frameheadgadget.cppindex 75b5acfa7..29e3876df 100644--- a/toonz/sources/toonz/frameheadgadget.cpp+++ b/toonz/sources/toonz/frameheadgadget.cpp@@ -37,6 +37,12 @@ void enableOnionSkin(bool enable = true)osmh->notifyOnionSkinMaskChanged();}+void enableZeroThick(bool enable = true)+{+ Preferences::instance()->setShow0ThickLines(enable);+ TApp::instance()->getCurrentScene()->notifySceneChanged();+}+bool isOnionSkinEnabled(){TOnionSkinMaskHandle *osmh = TApp::instance()->getCurrentOnionSkin();@@ -681,3 +687,20 @@ public:enableOnionSkin(checked);}} onionSkinToggle;+++class ZeroThickToggle : public MenuItemHandler+{+public:+ ZeroThickToggle() : MenuItemHandler(MI_ZeroThick)+ {+ }+ void execute()+ {+ QAction *action = CommandManager::instance()->getAction(MI_ZeroThick);+ if (!action)+ return;+ bool checked = action->isChecked();+ enableZeroThick(checked);+ }+} ZeroThickToggle;diff --git a/toonz/sources/toonz/mainwindow.cpp b/toonz/sources/toonz/mainwindow.cppindex f16816e47..7627a6235 100644--- a/toonz/sources/toonz/mainwindow.cpp+++ b/toonz/sources/toonz/mainwindow.cpp@@ -1853,7 +1853,8 @@ void MainWindow::defineActions()createRightClickMenuAction(MI_BlendColors, tr("&Blend colors"), "");- createToggle(MI_OnionSkin, tr("Onion Skin"), "", false, RightClickMenuCommandType);+ createToggle(MI_OnionSkin, tr("Onion Skin"), "/", false, RightClickMenuCommandType);+ createToggle(MI_ZeroThick, tr("Zero Thick Lines"), "Shift+/", false, RightClickMenuCommandType);//createRightClickMenuAction(MI_LoadSubSceneFile, tr("Load As Sub-xsheet"), "");//createRightClickMenuAction(MI_LoadResourceFile, tr("Load"), "");diff --git a/toonz/sources/toonz/menubarcommandids.h b/toonz/sources/toonz/menubarcommandids.hindex 10b3c2685..287adcb2f 100644--- a/toonz/sources/toonz/menubarcommandids.h+++ b/toonz/sources/toonz/menubarcommandids.h@@ -218,6 +218,7 @@#define MI_ResetRoomLayout "MI_ResetRoomLayout"#define MI_OnionSkin "MI_OnionSkin"+#define MI_ZeroThick "MI_ZeroThick"//#define MI_LoadResourceFile "MI_LoadResourceFile"#define MI_DuplicateFile "MI_DuplicateFile"