mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-17 07:10:36 +00:00
Create and use new signal: PalettePresetsChange
This commit is contained in:
parent
be48c40dc5
commit
3211831da3
@ -124,6 +124,7 @@ namespace app {
|
|||||||
obs::signal<void()> Exit;
|
obs::signal<void()> Exit;
|
||||||
obs::signal<void()> PaletteChange;
|
obs::signal<void()> PaletteChange;
|
||||||
obs::signal<void()> ColorSpaceChange;
|
obs::signal<void()> ColorSpaceChange;
|
||||||
|
obs::signal<void()> PalettePresetsChange;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class CoreModules;
|
class CoreModules;
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "app/commands/commands.h"
|
#include "app/commands/commands.h"
|
||||||
#include "app/commands/params.h"
|
#include "app/commands/params.h"
|
||||||
#include "app/context.h"
|
#include "app/context.h"
|
||||||
#include "app/extensions.h"
|
|
||||||
#include "app/file/palette_file.h"
|
#include "app/file/palette_file.h"
|
||||||
#include "app/file_selector.h"
|
#include "app/file_selector.h"
|
||||||
#include "app/i18n/strings.h"
|
#include "app/i18n/strings.h"
|
||||||
@ -80,7 +79,7 @@ void SavePaletteCommand::onExecute(Context* context)
|
|||||||
set_current_palette(palette, false);
|
set_current_palette(palette, false);
|
||||||
}
|
}
|
||||||
if (m_save_as_preset) {
|
if (m_save_as_preset) {
|
||||||
App::instance()->extensions().PalettesChange();
|
App::instance()->PalettePresetsChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1132,7 +1132,7 @@ void Extensions::generateExtensionSignals(Extension* extension)
|
|||||||
{
|
{
|
||||||
if (extension->hasLanguages()) LanguagesChange(extension);
|
if (extension->hasLanguages()) LanguagesChange(extension);
|
||||||
if (extension->hasThemes()) ThemesChange(extension);
|
if (extension->hasThemes()) ThemesChange(extension);
|
||||||
if (extension->hasPalettes()) PalettesChange();
|
if (extension->hasPalettes()) PalettesChange(extension);
|
||||||
if (extension->hasDitheringMatrices()) DitheringMatricesChange(extension);
|
if (extension->hasDitheringMatrices()) DitheringMatricesChange(extension);
|
||||||
#ifdef ENABLE_SCRIPTING
|
#ifdef ENABLE_SCRIPTING
|
||||||
if (extension->hasScripts()) ScriptsChange(extension);
|
if (extension->hasScripts()) ScriptsChange(extension);
|
||||||
|
@ -182,7 +182,7 @@ namespace app {
|
|||||||
obs::signal<void(Extension*)> NewExtension;
|
obs::signal<void(Extension*)> NewExtension;
|
||||||
obs::signal<void(Extension*)> LanguagesChange;
|
obs::signal<void(Extension*)> LanguagesChange;
|
||||||
obs::signal<void(Extension*)> ThemesChange;
|
obs::signal<void(Extension*)> ThemesChange;
|
||||||
obs::signal<void()> PalettesChange;
|
obs::signal<void(Extension*)> PalettesChange;
|
||||||
obs::signal<void(Extension*)> DitheringMatricesChange;
|
obs::signal<void(Extension*)> DitheringMatricesChange;
|
||||||
obs::signal<void(Extension*)> ScriptsChange;
|
obs::signal<void(Extension*)> ScriptsChange;
|
||||||
|
|
||||||
|
@ -124,6 +124,9 @@ PalettesListBox::PalettesListBox()
|
|||||||
m_extPaletteChanges =
|
m_extPaletteChanges =
|
||||||
App::instance()->extensions().PalettesChange.connect(
|
App::instance()->extensions().PalettesChange.connect(
|
||||||
base::Bind<void>(&PalettesListBox::reload, this));
|
base::Bind<void>(&PalettesListBox::reload, this));
|
||||||
|
m_extPresetsChanges =
|
||||||
|
App::instance()->PalettePresetsChange.connect(
|
||||||
|
base::Bind<void>(&PalettesListBox::reload, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
doc::Palette* PalettesListBox::selectedPalette()
|
doc::Palette* PalettesListBox::selectedPalette()
|
||||||
|
@ -34,6 +34,7 @@ namespace app {
|
|||||||
|
|
||||||
ui::TooltipManager m_tooltips;
|
ui::TooltipManager m_tooltips;
|
||||||
obs::scoped_connection m_extPaletteChanges;
|
obs::scoped_connection m_extPaletteChanges;
|
||||||
|
obs::scoped_connection m_extPresetsChanges;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace app
|
} // namespace app
|
||||||
|
Loading…
Reference in New Issue
Block a user