File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class DVAPI FullColorPalette final : public QObject {
3636 TPalette *getPalette (ToonzScene *scene);
3737 void savePalette (ToonzScene *scene);
3838 bool isFullColorPalette (TPalette *palette) { return m_palette == palette; }
39+ const TFilePath getPath () const { return m_fullcolorPalettePath; }
3940};
4041
4142#endif // FULLCOLOR_PALETTE
Original file line number Diff line number Diff line change @@ -1532,7 +1532,7 @@ bool IoCmd::saveLevel(const TFilePath &path) {
15321532 realPath = TFilePath (realPath.getWideString () + ::to_wstring (dotts + ext));
15331533
15341534 bool ret = saveLevel (realPath, sl, false );
1535- if (!ret){ // save level failed
1535+ if (!ret) { // save level failed
15361536 return false ;
15371537 }
15381538
@@ -2948,6 +2948,8 @@ class OverwritePaletteCommandHandler final : public MenuItemHandler {
29482948 }
29492949 if (sl->getPath ().getType () == " pli" )
29502950 palettePath = sl->getPath ();
2951+ else if (sl->getType () & FULLCOLOR_TYPE)
2952+ palettePath = FullColorPalette::instance ()->getPath ();
29512953 else
29522954 palettePath = sl->getPath ().withType (" tpl" );
29532955 }
@@ -2987,6 +2989,8 @@ class OverwritePaletteCommandHandler final : public MenuItemHandler {
29872989
29882990 if (sl && sl->getPath ().getType () == " pli" )
29892991 sl->save (palettePath, TFilePath (), true );
2992+ else if (sl->getType () & FULLCOLOR_TYPE)
2993+ FullColorPalette::instance ()->savePalette (scene);
29902994 else
29912995 StudioPalette::instance ()->save (palettePath, palette);
29922996 /* - Dirtyフラグの変更 -*/
You can’t perform that action at this time.
0 commit comments