The error is confusing because the user doesn't know that we're trying
to access the clipboard info only to fill Width/Height fields
automatically on File > New. Some errors (like "invalid image format")
should be displayed only when we use Edit > Paste explicitly.
It looks like we cannot trust in the get_current_palette() content
when we are running scripts without UI. So it's preferable if we get
the palette directly from the sprite.
We should completely remove the get_current_palette() function.
Tests can be found in https://github.com/aseprite/tests/blob/main/scripts/inks.lua
This issue brought a lot of other related issues (like slice chunks
being saved incorrectly in .aseprite file, etc.). This is an
alternative fix to PR #3141 where a std::sort() was proposed.
Also we've restored the default algorithm to bilinear + mipmapping,
which was the default on the Aseprite before we switched to Skia m96.
This was requested by some users.
This was done to avoid some nullptr references using
SkinTheme::instance() (mainly from
StatusBar::IndicatorsGeneration::add()) when the application is being
closed because an exception was thrown. This might be useful to detect
certain kind of crashes from Sentry.
There is a state where m_selected is pointing to an item that doesn't
exist in the current list of items. We didn't detect this on Debug
mode yet, but we've received one Sentry crash report about it.
Instead of using the window size, we can use the available workarea to
know that the user can resize the main window to its full size and
there will be enough room to display some common dialogs like the
Preferences one.
Before this fix, the Sprite:deleteLayer/Slice/etc() Lua functions
didn't warn the user if its argument (a layer/slice/etc) didn't belong
to the corresponding sprite.
We can interpret a quick mouse down/up events (e.g. less than 250
milliseconds) as a simple click if the mouse doesn't move too much in
the middle of both events (e.g. a tiny rectangle of 7x7 pixels).
Some discussion about this: https://community.aseprite.org/t/12491/10
Mainly for Line-like tools (which require the last mouse position
only). Related to #3119, possible fix for several performance issues
on Linux mainly.
Avoid using include_directories() and add_definitions() as much as
possible.
This change was made to avoid a problem using HAVE_CONFIG_H on Sentry
breakpad implementation where HAVE_CONFIG_H is used (but our config.h
is different from the expected one in breakpad).