This is needed on X11/Linux as we received a lot of mouse events at
the same time when the user drag the mouse. In this way we avoid
restarting the preview and making a high CPU usage just to stop/start
the filter without any kind of UI feedback.
Added FILTER_LOOP_THROUGH_ROW_BEGIN/END macros to simplify some
boilerplate code for each filter.
In this way if processing just one row takes too much time, canceling
the operation is faster.
We can use a thread pool (avoid creating/destroying threads) and we
can continue the same task running when the filter restart (there is
no need to stop/wait and restart, because the filter task keeps
calling the applyStep() function anyway).
Several changes were included:
- Fixes in TextBox widget to show it with proper size hint when it's
outside a viewport
- Added the IncompatFileWindow with a message + link to know how to
update Aseprite and solve the situation
- Moved CannotModifyWhenReadOnlyException from app/doc.h to
app/transaction.h
Given 32ed6622d45b748a0340877e3658ff1eafa05299, now we could be in a
situation where the sprite is loaded without layers because all layers
are incompatible with the current version. So we have to take care of
this situation in the Timeline UI.
With multiple windows on, if a modal/foreground window like Canvas
Size (which has a special onBroadcastMouseMessage()) were running, and
there was a script dialog also opened on the background, the
non-foreground dialog could receive clicks. This patch fixes this
particular scenario (no other window than the actual foreground window
can receive mouse clicks).
In this way we can completely disable the log of data recovery events.
In a future we might offer a way to log all these events in a log file
(probably included in crash reports).
We've received crash reports where save_xml() throws an Exception()
because the user brushes file cannot be saved (open_file(..., "wb")
returns nlulptr). We're not sure why (probably privileges?) but at
least we fixed the exception.
Added properties needed to know where the mouse position is on the
editor canvas + a method to cancel app.editor:askPoint() from Lua.
Related to aseprite/Attachment-System#102
This is the first attempt to finally implement the require() function
on Lua. The main problem was how to solve conflicts between plugins
that use the same library name. Here we separate each plugin like in a
namespace, so require(name) inside a plugin will save the module in
_LOADED["pluginName/libraryName"] to avoid conflicts with other
libraryName from other plugins.
We receive kMouseMoveMessage as the first message of a multiselect
message in a ListBox when the kMouseDownMessage message is received by
a separator first e.g. if we click a separator from the Recover Files
tab and start dragging the mouse this assert was failing.
Before this the ASSERT(group.items.empty()) in
AppMenus::removeMenuGroup() was failing when a plugin created
subgroups/submenus inside groups.
We have to remove plugins items in the reverse order that they were
added to uninstall them correctly.