Auto spritesheet reload; operator symbols on Change All Frame Properties buttons
- Settings > File > Auto Spritesheet Reload (on by default, every 2 s): spritesheets whose files change on disk are reloaded as one undoable edit; ones with unsaved pixel edits are left alone, and the editor's own saves don't trigger a reload. Document::spritesheets_reload is shared with the Reload action. - Change buttons read "= Adjust", "+ Add", "- Subtract", "× Multiply", "÷ Divide". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d8ab5ff018
commit
993957decf
10 files changed
+76
-25
No files matched your search
@@ -268,25 +268,7 @@ namespace anm2ed::imgui
|
||||
TOOLTIP_REMOVE_UNUSED_SPRITESHEETS);
|
||||
actions.add(
|
||||
ACTION_RELOAD, isAny,
|
||||
[&]()
|
||||
{
|
||||
command_push(panel,
|
||||
[selection](Document& document)
|
||||
{
|
||||
document.edit_apply(EDIT_RELOAD_SPRITESHEETS,
|
||||
[&](model::Model&)
|
||||
{
|
||||
for (auto id : selection)
|
||||
document.texture_reload(id);
|
||||
});
|
||||
for (auto id : selection)
|
||||
if (auto spritesheet = spritesheet_get(document, id))
|
||||
{
|
||||
document.spritesheet_hash_set_saved(id);
|
||||
toast_log(Level::INFO, TOAST_RELOAD_SPRITESHEET, id, path::to_utf8(spritesheet->path));
|
||||
}
|
||||
});
|
||||
},
|
||||
[&]() { command_push(panel, [selection](Document& document) { document.spritesheets_reload(selection); }); },
|
||||
TOOLTIP_RELOAD_SPRITESHEETS);
|
||||
actions.add(
|
||||
ACTION_REPLACE, isOne, [&]() { dialog.file_open(Dialog::SPRITESHEET_REPLACE); }, TOOLTIP_REPLACE_SPRITESHEET);
|
||||
|
||||
Reference in new issue
Block a user