Merge pull request #21 from opentoonz/fix_save_raster_problem

Raster LevelをSaveLevelAsで保存すると画像が消えてしまう不具合の修正
This commit is contained in:
roentgen 2016-03-24 17:01:32 +09:00
commit fc1fb92bcf
5 changed files with 11 additions and 4 deletions

Binary file not shown.

View file

@ -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

View file

@ -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 ?";

View file

@ -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);

View file

@ -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>