Skip to content

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

C

fix save raster level problem

shun_iwasawaf81af248fcd1
diff --git a/stuff/config/loc/japanese/toonz.qm b/stuff/config/loc/japanese/toonz.qm
index cb187e11c..7eac44366 100644
Binary files a/stuff/config/loc/japanese/toonz.qm and b/stuff/config/loc/japanese/toonz.qm differ
diff --git a/toonz/sources/toonz/filebrowserpopup.cpp b/toonz/sources/toonz/filebrowserpopup.cpp
index 1aff307fa..a883e4f25 100644
--- a/toonz/sources/toonz/filebrowserpopup.cpp
+++ b/toonz/sources/toonz/filebrowserpopup.cpp
@@ -1371,7 +1371,9 @@ bool SaveLevelAsPopup::execute()
// ask whether to expose the saved level in xsheet
bool doExpose = true;
- if (ret && !Preferences::instance()->isReplaceAfterSaveLevelAsEnabled()) {
+ if (levelToBeReplaced->getType()& FULLCOLOR_TYPE)
+ doExpose = false;
+ else if (ret && !Preferences::instance()->isReplaceAfterSaveLevelAsEnabled()) {
QString question(QObject::tr("Do you want to expose the renamed level ?"));
int val = MsgBox(question,
QObject::tr("Expose"), //val = 1
diff --git a/toonz/sources/toonz/iocommand.cpp b/toonz/sources/toonz/iocommand.cpp
index c65b52534..5d443cb04 100644
--- a/toonz/sources/toonz/iocommand.cpp
+++ b/toonz/sources/toonz/iocommand.cpp
@@ -1596,7 +1596,8 @@ bool IoCmd::saveLevel(const TFilePath &fp, TXshSimpleLevel *sl, bool overwrite)
// Confirmation of Overwrite palette
// open dialog IF 1) the level is dirty, and 2) confirmation of overwrite palette haven't been asked
// for PLI file, do nothing
- if (sl->getPalette()->getAskOverwriteFlag() &&
+ if (sl->getPalette() &&
+ sl->getPalette()->getAskOverwriteFlag() &&
sl->getPath().getType() != "pli") {
QString question;
question = "Palette " + QString::fromStdWString(sl->getPalette()->getPaletteName()) + ".tpl has been modified. Do you want to overwrite palette as well ?";
diff --git a/toonz/sources/toonz/preferencespopup.cpp b/toonz/sources/toonz/preferencespopup.cpp
index fb3b5ae1b..4b7e42cb0 100644
--- a/toonz/sources/toonz/preferencespopup.cpp
+++ b/toonz/sources/toonz/preferencespopup.cpp
@@ -840,7 +840,7 @@ PreferencesPopup::PreferencesPopup()
CheckBox *minimizeRasterMemoryCB = new CheckBox(tr("Minimize Raster Memory Fragmentation *"), this);
CheckBox *autoSaveCB = new CheckBox(tr("Save Automatically Every Minutes"));
m_minuteFld = new IntLineEdit(this, 15, 1, 60);
- CheckBox *replaceAfterSaveLevelAsCB = new CheckBox(tr("Replace Level after SaveLevelAs command"), this);
+ CheckBox *replaceAfterSaveLevelAsCB = new CheckBox(tr("Replace Toonz Level after SaveLevelAs command"), this);
m_cellsDragBehaviour = new QComboBox();
m_undoMemorySize = new DVGui::IntLineEdit(this, m_pref->getUndoMemorySize(), 0, 2000);
diff --git a/toonz/sources/translations/japanese/toonz.ts b/toonz/sources/translations/japanese/toonz.ts
index a89a6846b..dd7ca075d 100644
--- a/toonz/sources/translations/japanese/toonz.ts
+++ b/toonz/sources/translations/japanese/toonz.ts
@@ -5203,7 +5203,7 @@ Do you want to overwrite it?</source>
</message>
<message>
<source>Replace Level after SaveLevelAs command</source>
- <translation>レベルを別名で保存した後、レベルを置き換える</translation>
+ <translation type="vanished">レベルを別名で保存した後、レベルを置き換える</translation>
</message>
<message>
<source>* Changes will take effect the next time you run Toonz</source>
@@ -5377,6 +5377,10 @@ Do you want to overwrite it?</source>
<source>Use Xsheet as Animation Sheet</source>
<translation>タイムシートを動画シートとして用いる</translation>
</message>
+ <message>
+ <source>Replace Toonz Level after SaveLevelAs command</source>
+ <translation>Toonzレベルを別名で保存した後、レベルを置き換える</translation>
+ </message>
</context>
<context>
<name>PreferencesPopup::FormatProperties</name>