It looks like the mouse got captured by the Aseprite window if we
start the Zenity command using the mouse in certain way (e.g. when we
click the Open File link from the Home tab). The same doesn't happen
if we press Ctrl+O or click the File > Open menu.
New json.decode(jsonText) and json.encode(luaTable) functions.
In this way we don't depend on third-party libraries to decode/encode
JSON text which is a quite common task (in tests and export scripts).
The default language (en.ini) has a new "display_name" property, but
probably we should remove it and transform the English language in an
extension (just as the default Aseprite theme).
When we received a MouseEnter/Leave, we were processing those laf-os
events immediately without taking care of all the MouseMove/Down/Up
events in the middle. Now we enqueue all the events as
messages (MouseEnter -> MouseMove/Down/Up -> MouseLeave).
This is important because when we process MouseLeave we are calling
setMouse(nullptr), which resets the mouse widget HAS_MOUSE flag, and
some widgets needs to know if they have the mouse above before the
MouseUp event. With this change we can remove the
Widget::hasMouseOver() function (that was checking the global
ui::get_mouse_position() instead of the HAS_MOUSE flag directly).
Another change was introduced to keep the old behavior now that
hasMouseOver() is not available: the ui::Manager doesn't assign the
HAS_MOUSE flag if the mouse is captured (it only assign the HAS_MOUSE
to the widget with the mouse captured, or to no widget, at least until
the capture is released).
Replaced the App BeforePaintEmptyTilemap event (introduced in
c26351712a21dece24ffee1b0a05ed4686412792) with the new Sprite
AfterAddTile event triggered by draw_image_into_new_tilemap_cel().
This new event handles two cases:
1) When the user paints on an empty tilemap cel, a new tile is
created, so the tile management plugin can handle AfterAddTile
to know the existence of this new tile. (This case was disabled
with fae3c6566cd87e0b5fcf788deab742b781876c4a, then handled with
c26351712a21dece24ffee1b0a05ed4686412792, now handled with this
patch).
2) When we copy & paste cels (or drag & drop cels) in the timeline
between layers, if a new tile is created, the AfterAddTile is
called and the plugin can associate tiles with its internal
information (e.g. folders)
Related to: https://github.com/aseprite/Attachment-System/issues/135
Before this fix, when installing dithering matrices if Aseprite
couldn't find the file of some matrix described in the json, Aseprite
would crash (this happened during the installation of an erroneous
dithering matrices extension, and after every reboot of Aseprite).
The cause of the crash was the absence of the MainWindow instance
during the ContextBar creation. When an error occurs, the console is
called, but since MainWindows is not yet available, aseprite crashes.
The Zenity utility is not perfect, there are several issues to improve
the UX, but it's good enough to offer a native file dialog on Linux
without depending on huge dynamic GUI libraries (GTK+, Qt, etc.).
Prior to this fix, there was a spurious movement on a selected image
simply by moving the pivot point. Steps to reproduce it:
- Select a canvas area
- Zoom at 300%
- Make the pivot visible and move it to a negative coordinate
position (less than the origin 0,0)
- If you rotate/skew the image this problem cannot be reproduced
This fixes unnecessary propagation of kKeyDownMessage/kKeyUpMessage
messages across all open editors. The pressed key should be sent to
the active editor or the one with the mouse over it.
We were able to reproduce this putting the black border of the
ColorBar's PaletteView touching its viewport, and changing from Screen
Scaling=200% & UI Scaling=100% to Screen Scaling=100% & UI
Scaling=200% (with the memory sanitizer on).
Fix regression introduced in 24846eae10c7340a4e7f103b15494ea8338700a9
using the new RenderPlan structure. We have to include empty/nullptr
cels in the plan to paint the preview image in the selected
layer/frame (the preview image is the one used for the brush preview,
and for the transformation preview when we paste the clipboard content
on the canvas).