Skip to content

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

C

fix menubar popup (#409)

shun-iwasawa04a71f109d22
diff --git a/toonz/sources/toonz/mainwindow.cpp b/toonz/sources/toonz/mainwindow.cpp
index f16816e47..dd984ba14 100644
--- a/toonz/sources/toonz/mainwindow.cpp
+++ b/toonz/sources/toonz/mainwindow.cpp
@@ -671,9 +671,9 @@ void MainWindow::readSettings(const QString &argumentLayoutFileName)
if (r == 0) //InknPaintRoom
TApp::instance()->setInknPaintViewerPanel(cvp);
mySettings.beginGroup(tmpRoomName);
- cvp->setShowHideFlag(CVPARTS_TOOLBAR, mySettings.value("Toolbar", false).toBool());
- cvp->setShowHideFlag(CVPARTS_TOOLOPTIONS, mySettings.value("ToolOptions", false).toBool());
- cvp->setShowHideFlag(CVPARTS_FLIPCONSOLE, mySettings.value("Console", false).toBool());
+ cvp->setShowHideFlag(CVPARTS_TOOLBAR, mySettings.value("Toolbar", true).toBool());
+ cvp->setShowHideFlag(CVPARTS_TOOLOPTIONS, mySettings.value("ToolOptions", true).toBool());
+ cvp->setShowHideFlag(CVPARTS_FLIPCONSOLE, mySettings.value("Console", true).toBool());
cvp->updateShowHide();
mySettings.endGroup();
}
diff --git a/toonz/sources/toonz/menubarpopup.cpp b/toonz/sources/toonz/menubarpopup.cpp
index 20882921c..52b21fc86 100644
--- a/toonz/sources/toonz/menubarpopup.cpp
+++ b/toonz/sources/toonz/menubarpopup.cpp
@@ -106,15 +106,15 @@ MenuBarTree::MenuBarTree(TFilePath & path, QWidget* parent)
setColumnCount(1);
header()->close();
- /*- m_path�����݂���Ȃ�t�@�C������ǂݍ��ށB������΃e���v���[�g��ǂݍ��� -*/
+ /*- Load m_path if it does exist. If not, then load from the template. -*/
TFilePath fp;
if (TFileStatus(path).isWritable())
fp = m_path;
else
{
- fp = m_path.withParentDir(ToonzFolder::getTemplateModuleDir());
+ fp = m_path.withParentDir(ToonzFolder::getTemplateRoomsDir());
if (!TFileStatus(path).isReadable())
- fp = ToonzFolder::getTemplateModuleDir() + "menubar_template.xml";
+ fp = ToonzFolder::getTemplateRoomsDir() + "menubar_template.xml";
}
loadMenuTree(fp);
@@ -477,7 +477,7 @@ MenuBarPopup::MenuBarPopup(Room* room)
/*- get menubar setting file path -*/
std::string mbFileName = room->getPath().getName() + "_menubar.xml";
- TFilePath mbPath = ToonzFolder::getMyModuleDir() + mbFileName;
+ TFilePath mbPath = ToonzFolder::getMyRoomsDir() + mbFileName;
m_commandListTree = new CommandListTree(this);
m_menuBarTree = new MenuBarTree(mbPath, this);
@@ -546,7 +546,6 @@ MenuBarPopup::MenuBarPopup(Room* room)
void MenuBarPopup::onOkPressed()
{
- /*- TODO: xml�Ƀc���[�̏�Ԃ��������� -*/
m_menuBarTree->saveMenuTree();
accept();