Fix saving modified Palette Level's palette
This commit is contained in:
parent
0f36cd1b8f
commit
9a59ad9f58
1 changed files with 3 additions and 1 deletions
|
@ -100,7 +100,8 @@ void TXshPaletteLevel::load() {
|
|||
|
||||
void TXshPaletteLevel::save() {
|
||||
TFilePath path = getScene()->decodeFilePath(m_path);
|
||||
if (TSystem::doesExistFileOrLevel(path) && m_palette) {
|
||||
if (TSystem::doesExistFileOrLevel(path) && m_palette &&
|
||||
m_palette->getDirtyFlag()) {
|
||||
TFileStatus fs(path);
|
||||
if (!fs.isWritable()) {
|
||||
throw TSystemException(
|
||||
|
@ -108,6 +109,7 @@ void TXshPaletteLevel::save() {
|
|||
}
|
||||
TOStream os(path);
|
||||
os << m_palette;
|
||||
m_palette->setDirtyFlag(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue