Commit Graph

8137 Commits

Author SHA1 Message Date
David Capello
8b5133b4c0 [lua] Fix context used in App.useTool() 2022-02-11 10:41:56 -03:00
David Capello
0c1e08138e [lua] Fix crash using app.useTool() when the active editor is in MovingPixelsState (fix #2933)
More information in https://github.com/aseprite/aseprite/pull/3166
2022-02-11 10:19:32 -03:00
David Capello
1f4e3bcd11 Merge branch 'main' into beta 2022-02-08 12:56:26 -03:00
David Capello
845ff17788 Fix "Reset Scale" notification when there is enough workarea available
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.
2022-02-08 12:07:36 -03:00
David Capello
903401e28d Fix radial gradient when the gradient vector is close to (0,0) (fix #3126) 2022-02-07 19:03:40 -03:00
David Capello
0588ebd01b [lua] Generate onclick event when we reorder/click a Dialog:shades with { mode="sort" } (fix #3081) 2022-02-04 17:36:49 -03:00
David Capello
97389dd1a3 [lua] New API version 2022-02-04 14:08:19 -03:00
David Capello
9cf2ff782f [lua] Fix Color.index to return an integer instead of a number (fix #3159) 2022-02-04 13:44:13 -03:00
David Capello
8d4941d86c [lua] Add Color{ index } ctor 2022-02-04 13:43:43 -03:00
David Capello
0cfeacab5c Stop filter preview before we change filter parameters
Similar fixes as in 811b893320
2022-02-03 14:59:46 -03:00
Joshua Ogunyinka
811b893320 Fix occassional crashes in despeckle/median filter (fix #2903) 2022-02-03 12:51:30 -03:00
Gaspar Capello
653931c4fc [lua] Add a warning message deleting objects that are not part of the sprite (fix #3135)
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.
2022-02-03 11:02:55 -03:00
David Capello
aec012a0d9 Fix crash using a nullptr m_pixelsMovement on MovingPixelsState::onCommitMouseMove() (fix #3161) 2022-02-03 10:57:49 -03:00
Joshua Ogunyinka
aa188d641b Fix moving rectangular marquee box while selecting color (fix #3143) 2022-02-03 10:11:25 -03:00
David Capello
bf48381c23 Show selected index correctly in PaletteViews used from ColorPopups (regression introduced in d164458c24) 2022-01-14 16:44:13 -03:00
David Capello
ce9640fbd3 Fix regression about hidden Frame/Zoom indicators by default in StatusBar
Bug report: https://community.aseprite.org/t/12488/11
2022-01-14 16:27:00 -03:00
David Capello
23db76216a Fix full MenuBox width when adding scrollbars and exceeding the workspace.x2() limit 2022-01-14 15:18:18 -03:00
David Capello
69d0564a09 Fix crash closing a MenuBox with viewport (fix #3132, fix #3133)
Regression introduced in ed595eb6b1
calling MenuBox::setMenu() of the first child of a MenuBoxWindow when
handling its kCloseMessage. The firstChild() was supposed to be a
MenuBox, but we didn't take care of the case when the MenuBox is
replaced with a View when scrollbars are needed (added by
add_scrollbars_if_needed()).
2022-01-14 15:09:50 -03:00
David Capello
0b3773b17d Merge branch 'main' into beta 2022-01-13 08:44:22 -03:00
David Capello
9e23d31d84 Fix crash using Shift key in Pencil tool
Bug introduced in f3fd0de3d0
2022-01-13 08:43:03 -03:00
David Capello
835b76e83a Merge branch 'main' into beta 2022-01-13 07:09:25 -03:00
David Capello
f3fd0de3d0 Improve detection of one click when using a stylus
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
2022-01-12 23:23:19 -03:00
David Capello
87e8b45dc1 Fix regression clicking same spot w/Rectangular Marquee to deselect
Regression introduced in 26c1a94b83

Reported:
- https://community.aseprite.org/t/12491/1
- https://steamcommunity.com/app/431730/discussions/0/3200371016617015005/
2022-01-12 22:23:26 -03:00
David Capello
14a9327573 Fix popup menu size when multiple windows UI is disabled
Fixed regression introduced in ed595eb6b1

Reported:
- https://community.aseprite.org/t/12497
2022-01-12 22:22:05 -03:00
David Capello
c780ff3e75 Merge branch 'main' into beta 2022-01-12 08:35:26 -03:00
David Capello
8295afbfe2 Update laf module (fix #3125) 2022-01-12 08:23:03 -03:00
David Capello
53c1041953 Merge branch 'main' into beta 2022-01-11 14:42:48 -03:00
David Capello
5b1740cddd [win] Fix the detection of a crash to report via Sentry 2022-01-11 14:39:52 -03:00
David Capello
6d7b69e67f Merge branch 'main' into beta 2022-01-11 11:58:12 -03:00
David Capello
de40d53aac Update laf module 2022-01-11 11:57:36 -03:00
David Capello
07cf70361b Set os::Window user data to nullptr before setting mouse cursors
In this way we don't process any queued native message for the display
as it will be deleted. This could be a possible fix for some crashes
reported in set_native_cursor_on_all_displays() (#2907)
2022-01-11 11:43:05 -03:00
David Capello
0f04e016b6 Set same scroll position in timeline after updating scrollable area
This fixes the following problem:

* Hide the Timeline, and restart the program
* Open a sprite with a lot of layers
* Show the Timeline

Without this fix, depending on the selected layer the scroll will be
invalid and the layer will not be displayed by default when the
Timeline appears.

Related to 229ded9642
2022-01-11 11:34:30 -03:00
Joshua Ogunyinka
f9d41665f0 Fix bounds getting reset when a dialog is closed (fix #3018) 2022-01-11 11:20:01 -03:00
David Capello
d52455b200 Fix centering the Console correctly when using UI w/multiple windows 2022-01-11 10:41:58 -03:00
David Capello
efd8a71b9f Merge branch 'main' into beta 2022-01-10 17:03:04 -03:00
David Capello
8a9206a757 Update laf module 2022-01-10 17:00:58 -03:00
David Capello
817879d700 Fix possible infinite loop reading broken .aseprite files (fix #3123) 2022-01-10 17:00:12 -03:00
David Capello
f7a87af0fd Fix crash using Shift+click on Pencil tool (cherry-picked from ab3bf31c6a) 2022-01-10 15:59:36 -03:00
David Capello
229ded9642 Fix regression detected in #3066 setting default timeline scroll pos 2022-01-10 11:41:33 -03:00
David Capello
8ec2fff447 Merge branch 'main' into beta 2022-01-06 18:44:38 -03:00
David Capello
06cfbd794e Use DelayedMouseMove for MovingCelState too (#3119) 2022-01-06 18:43:12 -03:00
David Capello
ab3bf31c6a Merge branch 'main' into beta 2022-01-06 17:44:43 -03:00
David Capello
26c1a94b83 Group several mouse movement in one on the Editor
Mainly for Line-like tools (which require the last mouse position
only). Related to #3119, possible fix for several performance issues
on Linux mainly.
2022-01-06 16:54:39 -03:00
David Capello
bc8e1b36eb Update copyright year 2022-01-05 20:45:08 -03:00
David Capello
ed595eb6b1 Fix crash when a MenuBoxWindow is closed from the os::Window close button (#2777) 2022-01-05 20:33:32 -03:00
David Capello
6e726025ee Merge branch 'main' into beta 2022-01-05 20:16:13 -03:00
David Capello
bc22073a4e Update laf module 2022-01-05 20:14:56 -03:00
David Capello
4619089869 Fix warning in ColorBar::onIsPaletteViewActive() 2022-01-05 20:14:00 -03:00
David Capello
02de9be1ab Rename src/tests/test.h -> src/tests/app_test.h to avoid confusion with observable tests/test.h 2021-12-23 21:38:17 -03:00
David Capello
6836911661 Don't define HAVE_CONFIG_H and include "src" directory globally
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).
2021-12-22 19:08:43 -03:00