Gaspar Capello
f7b6674680
Fix Marqueed selection gets some rows duplicated when moved left and right over left canvas edge with Ctrl still pressed #2891
...
Prior to this fix, moving a marquee selection while holding down the Ctrl key outside the left/top area of the canvas results in a 1px distortion of the marquee image. This distortion is due to a false transformation when it is required to get the corner bounds, due to rounding the float coordinates towards 0 instead of the nearest left/top integer. The discrepancy occurs within the `getDraggedImageCopy`, `redrawExtraImage`, `drawImage` and `drawMask` functions.
2022-07-14 14:41:01 -03:00
Gaspar Capello
2785a9fef7
Remove fillOrphansNodes(), now new colors are added to the octree color arragement
...
This gives more accuracy in the color picking criteria on new images
pasted into an INDEXED sprite.
Also, added findMaskColor to fix the behavior reported in #3207
Both issues are related when RGBMAP is created. The 'mask color' and
'mask index' must be defined correctly to include/exclude during the
table/octree map color search.
To do: Converting sprite to INDEXED should add 'mask color' to the
palette when color count < 256 and transparent color isn't in the
palette.
2022-07-14 14:27:20 -03:00
David Capello
f8f925c634
Merge branch 'main' into beta
2022-07-13 19:49:03 -03:00
David Capello
d46724329f
Minor improvement in FlattenLayers to avoid some cmds
...
Instead of creating cmd::SetLayerName and cmd::MoveLayer, we can add
the layer with its name and in the correct place directly.
2022-07-11 10:10:36 -03:00
David Capello
6e0394b7dc
Fix using MoveMask command without visible selection
...
Issue found testing #2796 without selection/without calling SelectTile
command.
2022-07-07 16:33:39 -03:00
David Capello
4f2eae6b77
Use C++17 [[fallthrough]] if needed
2022-06-29 20:14:03 -03:00
David Capello
b01c28c48d
Add missing override modifier
2022-06-29 20:05:58 -03:00
David Capello
7aa90db770
[lua] Add undo information in Sprite:newSlice() ( fix #3393 )
2022-06-29 19:46:37 -03:00
David Capello
72df89f917
Fix ambiguous mix of || and && in if-expression
2022-06-29 11:21:58 -03:00
David Capello
d1e08fdb2f
Fix initialization order of AsepriteUpdate members
2022-06-29 11:10:18 -03:00
Martín Capello
bbbf866775
Fix name of define used in ifdefs
2022-06-28 19:16:36 -03:00
Martín Capello
627c96228b
Replace use of the new operator with std::make_unique
2022-06-28 19:16:32 -03:00
Martín Capello
d63c0f7e4b
Remove unnecessary DRM_CONFIGURE macro definition
2022-06-28 19:16:27 -03:00
Martín Capello
c640aee88a
Add app url parameter to DRM_CONFIGURE macro
2022-06-28 19:16:24 -03:00
Martín Capello
11d6eb1d07
Include ui/timer.h
2022-06-28 19:16:19 -03:00
Martín Capello
6535defe3c
Improve installation phases handling
2022-06-28 19:16:16 -03:00
Martín Capello
c764e364af
Add installation thread to the update process
2022-06-28 19:16:07 -03:00
Martín Capello
7ec08ca54c
Add Aseprite update dialog and fix enter license dialog
2022-06-28 19:16:03 -03:00
Martín Capello
1403424f3a
Update licence activation dialog to use a new version of the DRM's license manager that doesn't emit events
2022-06-28 19:15:47 -03:00
Martín Capello
b95e402449
Remove redundant include
2022-06-28 19:15:42 -03:00
Martín Capello
854e4eb370
Add conditional compilation of code for DRM-enabled trial version
2022-06-28 19:15:34 -03:00
Martín Capello
776b97deef
Refactor EnterLicense dialog and add license activation handling
2022-06-28 19:13:55 -03:00
Martín Capello
2639c36b2f
Create EnterLicense dialog
2022-06-28 19:09:10 -03:00
Martín Capello
588d8027f4
Conditionally compile the license activation code when the ENABLE_DRM flag is defined
2022-06-28 19:09:10 -03:00
Martín Capello
122769c836
Change the error message when the Save operation is not available
2022-06-28 19:09:10 -03:00
Martín Capello
f672193732
Fix linked libraries when ENABLE_DRM is on.
2022-06-28 19:09:10 -03:00
Martín Capello
740dd166de
Refactor the code to change the "register" dialog for "enter_license" dialog
2022-06-28 19:09:10 -03:00
Martín Capello
fcac48cccb
Add option to enter Aseprite license key ( #2664 )
...
This is an initial version to add an automatic update feature in the
future.
2022-06-28 19:09:10 -03:00
David Capello
faecd682fc
Merge branch 'main' into beta
2022-06-28 19:05:54 -03:00
Martín Capello
306e13dfad
Clear the exported images with its mask color instead of 0 ( fix #3391 )
2022-06-28 18:43:23 -03:00
Gaspar Capello
1f5e4cfc4f
Add '{title}' and '{layer}' functionality to the Export dialog ( fix aseprite/aseprite#3363 )
...
Also Add '{title}' functionality to CLI dialog on sprite-sheet file name
2022-06-28 18:42:33 -03:00
David Capello
3d0b5d809c
Fix bug in move_or_copy_palette_colors() accessing out-of-range index
2022-06-28 15:17:29 -03:00
David Capello
6d30f274f4
[msvc] Fix problem using invalid min/max bounds in std::clamp
...
There is an assert() in the std::clamp() impl on MSVC that checks if
the min/max values are valid.
2022-06-28 14:02:18 -03:00
David Capello
caf475b2dc
Merge branch 'main' into beta
2022-06-15 13:44:34 -03:00
David Capello
b7d5d4a2c9
Editable resize factor in File > Export ( fix #3007 )
...
Related to #3008
2022-06-15 12:25:43 -03:00
David Capello
af74f8bc84
Fix memory leak when the created cel is not used in ExpandCelCanvas
2022-06-14 23:25:10 -03:00
David Capello
4aa5fedfec
New "on the fly" resize when saving/exporting image ( fix #1112 )
...
Implemented using a new FileAbstractImage interface to get scanlines
for each frame automatically resized (without modifying the original
sprite/without using SpriteSize command/adding new undo information).
Related to #3008
2022-06-14 23:19:39 -03:00
David Capello
e2798bc849
Fix crash creating the "No Recent File" w/AppMenuItem() ( fix #3371 )
2022-06-14 14:01:28 -03:00
David Capello
30b61e501e
[lua] New Image(Image, Rectangle) ctor
2022-06-14 10:04:54 -03:00
David Capello
82cd244a6e
Add support to use SaveFile commands from CLI (without UI)
2022-06-13 19:19:44 -03:00
David Capello
ddc1b76214
Convert SaveFileBaseCommand to CommandWithNewParams
...
With this patch we fixed some use cases:
* We can show the ui with a default filename { filename=..., ui=true }
* We can specify fromFrame/toFrame for SaveFileCopyAs
2022-06-13 17:04:12 -03:00
David Capello
d160fb8b91
Minor changes in SaveFileCommand to use enums instead of bool params
2022-06-13 12:46:11 -03:00
David Capello
8f44b521b6
Merge branch 'main' into beta
2022-06-10 10:31:13 -03:00
David Capello
4471dab289
[osx] We cannot use std::optional::value() if we want to support macOS 10.9
...
It looks like value() member was introduced in macOS 10.13 (error
detected because we use CMAKE_OSX_DEPLOYMENT_TARGET=10.9).
2022-06-09 19:07:08 -03:00
David Capello
71d885d2a0
Replace base::clamp -> std::clamp as now we use C++17
2022-06-09 19:05:48 -03:00
David Capello
b2d46bf10b
Use std::unique_ptr/optional in more App objects
2022-06-09 17:29:40 -03:00
David Capello
99c0d5b743
Fix SpriteEvents destruction ( fix #3162 )
...
Classic "static initialization order fiasco" but in the destruction
phase.
2022-06-09 16:28:25 -03:00
David Capello
1630416991
Fix a crash when a script generates a Fg/BgColor change when closing the app
...
If a script Dialog changes the app.fgColor/bgColor in its onclose
callback, it will notify all fgColor/bgColor preference
observers (ContextBar is one of them), if we don't disconnect from
these signals when we're deleting ContextBar, the signals will call a
deleted slot/connection from app::script::close_all_dialogs().
2022-06-08 16:24:36 -03:00
David Capello
39ba883f90
Fix bugs executing plugin init/exit() functions in different situations
...
Reinstalling a previously enabled plugin extension wasn't running the
init() function, and uninstalling it wasn't calling its exit()
function.
2022-06-07 15:02:54 -03:00
David Capello
a39e235b23
Don't store a Command* pointer in AppMenuItem ( fix #3359 , fix #3360 )
...
Instead of storing a Command* we can store the command ID, which it's
less problematic in extreme cases where the Command that is being
referenced is deleted or recreated, i.e. when a plugin is
disabled/re-enabled.
2022-06-07 14:47:40 -03:00