From 01874c2b407cd30a6bb86763a282b26decd1a972 Mon Sep 17 00:00:00 2001 From: shun_iwasawa Date: Apr 22 2016 13:20:32 +0000 Subject: fix crash on new style --- diff --git a/toonz/sources/toonzqt/paletteviewergui.cpp b/toonz/sources/toonzqt/paletteviewergui.cpp index fd70763..070823c 100644 --- a/toonz/sources/toonzqt/paletteviewergui.cpp +++ b/toonz/sources/toonzqt/paletteviewergui.cpp @@ -1002,7 +1002,6 @@ void PageViewer::contextMenuEvent(QContextMenuEvent *event) menu.addAction(cutAct); menu.addSeparator(); - //iwasawa lockの時は無効化するため QAction *clearAct = cmd->getAction(MI_Clear); menu.addAction(clearAct); @@ -1074,10 +1073,13 @@ void PageViewer::contextMenuEvent(QContextMenuEvent *event) menu.addAction(cmd->getAction(MI_EraseUnusedStyles)); } */ - QAction *newStyle = menu.addAction(tr("New Style")); - connect(newStyle, SIGNAL(triggered()), SLOT(addNewColor())); - QAction *newPage = menu.addAction(tr("New Page")); - connect(newPage, SIGNAL(triggered()), SLOT(addNewPage())); + if (m_page) + { + QAction *newStyle = menu.addAction(tr("New Style")); + connect(newStyle, SIGNAL(triggered()), SLOT(addNewColor())); + QAction *newPage = menu.addAction(tr("New Page")); + connect(newPage, SIGNAL(triggered()), SLOT(addNewPage())); + } menu.exec(event->globalPos()); }