Commit Graph

6904 Commits

Author SHA1 Message Date
David Capello
f430b9ce77 Avoid accessing Preferences from background thread when loading preset palettes 2019-06-04 10:58:19 -03:00
David Capello
79795b97a9 Fix hang if we press Cmd-S two or more times quickly to launch File > Save
With this we avoid to unintentional execute two or more times a
command when we are already in a command execution.
2019-06-03 23:02:24 -03:00
David Capello
2ab27ade9b Blur tool: Don't make more transparent pixels with alpha < 255
Regression introduced in f3731c9c28 (which
fixed 065ad4f1dc). I think this is the
final version of the blur tool: doesn't make pixels more darker nor
transparent.
2019-06-03 21:04:08 -03:00
David Capello
0e2fcffaa0 Add missing <condition_variable> header file to use std::condition_variable 2019-06-02 22:23:52 -03:00
David Capello
563c23117e Fix brush cursor bug with Gradient tool
https://community.aseprite.org/t/cursor-for-fill-tool-off-centre/3158
2019-06-01 11:04:48 -03:00
David Capello
fbbb3238a6 Save closed docs backup data when we close the application correctly
Also some extra improvements like:
* Wake up every X seconds/minutes to check if we have to save some
  backup data (instead of each one second)
* Use a condition variable to wakeup when we quit the application
2019-05-31 19:59:43 -03:00
David Capello
f3731c9c28 Avoid making the color darker with Blur tool when alpha < 255 (fix #708)
Related to 065ad4f1dc
2019-05-31 18:36:09 -03:00
David Capello
8aaf679406 Add missing <algorithm> header to use std::sort() 2019-05-31 14:10:56 -03:00
Gaspar Capello
43b4c77be5 Minor fix, shape closing with Polygon Tool
The purpose of this fix is to match polygon preview with the polygon
result when using Polygon Tool (before this fix, we were been see few
pixels differences on the shape closing segment). To achieve this, the
way how we draw the entire joinStroke has to match how polygon
function interpolate the final stroke which closes the shape. So, the
input vertices of doPointshapeLine function were swapped.
2019-05-31 13:34:06 -03:00
Gaspar Capello
8c55d34e32 Fix polygon rasterization
This fix is intended to create a polygon that matches with its preview
in one drawing step (needed when we want to draw with Contour or
Polygon tool with custom brushes with alpha content). Before this fix,
the polygon was being created in a first step, and then a second step
that patches the contour (over writing the Image with an extra
joinStroke execution of the entire contour).

- Added createUnion function in polygon.cpp to force drawing of the
  input points in each scan line render.
- Added algo_line_continuous inside polygon function to interpolate
  holes between input vertices.
- Deleted extra joinStroke execution in fillStroke function in class
  IntertwineAsLines and  class IntertwineAsPixelPerfect inside
  intertwines.h
- Added Stroke::erase function to Stroke class. It is needed inside
  IntertwineAsPixelPerfect class to get a clear m_pts (without the
  extra points due to mini L shapes, due to pixel perfect process). In
  fillStroke function in class  IntertwineAsPixelPerfect inside
  intertwiners.h, when it  executed, m_pts is delivered to polygon
  function instead of stroke argument in order to pass a pixel perfect
  processed vector instead of stroke vector which is a raw vector of
  vertices.
2019-05-31 13:02:22 -03:00
David Capello
1ac3148f72 Don't show full path on Data Recover view if the user wants to hide them 2019-05-31 09:42:08 -03:00
David Capello
93fe19d353 Use cancelable async tasks to load/delete backup sessions 2019-05-30 23:17:13 -03:00
David Capello
91665c62c3 Fix bug showing invalid warning in Edit > Pref when "keep edited sprite data lifespan" wasn't modified 2019-05-27 23:53:57 -03:00
David Capello
bcf6899793 Update display immediately after and undo/redo command is executed from the native macOS menu (fix #2069)
Replaced ui::kFunctionMessage with os::Event::Callback.
2019-05-27 23:53:57 -03:00
David Capello
df741c246b Show "Loading..." item in DataRecoveryView if the list wasn't loaded before we click the "Recover Files..." option 2019-05-27 23:53:57 -03:00
David Capello
54883012bb Put "Reopen Closed File" and "Clear Recent Files" options inside "File > Open Recent" menu 2019-05-27 23:53:57 -03:00
David Capello
cdb98d4cd5 Add File > Reopen Closed File command 2019-05-27 23:53:57 -03:00
David Capello
1b62515cd2 Add "Recover Files..." option in Home tab
We've changed the way the "recover files" option works:
* Now it's an option that is always available (so we can open files
  even from sessions that were correctly closed in the past)
* We can open sessions from other Aseprite versions (as in a "best
  effort" approach, if it works, ok, if it doesn't -> contact user
  support)
2019-05-27 23:53:57 -03:00
David Capello
0902fa7629 Fix crash closing the program when the Data Recovery tab open 2019-05-27 23:53:57 -03:00
David Capello
a6041272c9 Minor assert() in Preferences::save() 2019-05-27 23:53:57 -03:00
David Capello
57d5fcba68 lua: Don't include -x64 in app.version 2019-05-27 23:53:57 -03:00
David Capello
f6313f7dc6 Restore the default brush center to w/2 and h/2
This generated a lot of controversy. The new center ((w-1)/2
, (h-1)/2) was useful for scripts, but not too useful for right-handed
users that prefer the most bigger part of even-sized brushes to be in
the top-left edge (instead of bottom-right edge which was the new
behavior).

With this patch we revert the changes, and we'll see if we can add a
new option to change the default brush center which might be useful
for left-handed users.
2019-05-27 23:53:57 -03:00
David Capello
25cec1543c Fix "Repeat Last Export": params weren' filled with DocPref if ui=false
The "Repeat Last Export" command needs to copy DocPref to params, even
when the UI not used (also we must copy the DocPref to the params only
if sprite sheet type is not defined, which means that a script didn't
specify it).
2019-05-27 23:53:57 -03:00
David Capello
d6e00d8764 Fix IntertwineAsLines to use algo_line_perfect() again when snap to grid is enabled or kSquareAspect modifier is pressed 2019-05-27 23:53:57 -03:00
David Capello
232c551f1a Don't document preferences after loading it 2019-05-27 23:53:57 -03:00
David Capello
b0163f3937 Don't crash with div by zero when grid bounds has an invalid value 2019-05-27 23:53:57 -03:00
David Capello
54a1b1d67e Update zoom level in status bar correctly when we switch between sprites 2019-05-27 23:53:57 -03:00
David Capello
1873ec182c
Create FUNDING.yml 2019-05-23 17:22:12 -03:00
David Capello
fd2077ce7d Update INSTALL.md instructions (latest Visual Studio 2019, recent Xcode, etc.)
With recommendations from:

* https://github.com/aseprite/aseprite/pull/2046
* https://github.com/aseprite/aseprite/issues/1910#issuecomment-435145683
2019-05-17 14:48:47 -03:00
David Capello
289ec75496 Update Zughy-32 palette 2019-05-14 14:48:44 -03:00
David Capello
8e53b5f227 Fix contour tool (draw first pixel for contour tool) 2019-05-11 15:53:18 -03:00
David Capello
388af3f5e4 Fix symmetry for brushes with even size
This is a temporal fix, we should flip the brush center/image/etc.
2019-05-11 15:42:44 -03:00
David Capello
c07614cd5d Draw pixels that aren't in the viewport area when we use Shift+click to draw a straight line w/Pencil tool 2019-05-11 14:25:29 -03:00
David Capello
0407631bdc Fix value for a period of times of 10 seconds for backups 2019-05-11 14:10:25 -03:00
David Capello
b058077b07 Fix BackupObserver for periods < 1 minute 2019-05-11 13:59:26 -03:00
David Capello
38abac8b79 Fix crash on Windows using Manager::enqueueMessage() from non-UI thread
From time to time the app::BackupObserver::backgroundThread() will use
ui::execute_from_ui_thread() to show/hide the backup notification icon
in the StatusBar (see SwitchBackupIcon class). This
ui::execute_from_ui_thread() function enqueues a ui::FunctionMessage
calling the Manager::enqueueMessage(). The issue here is that
enqueueMessage() uses ui::is_ui_thread() to check if the thread that
wants to enqueue the message is the UI thread or other thread, and
depending on this decission the message will be directly added to
msg_queue or enqueued into concurrent_msg_queue.

The issue was that ui::is_ui_thread() was not working correctly on
Windows because GetCurrentThread() is not useful to check the current
thread with a previous call of GetCurrentThread() from other
thread (the function always return the same value, a special generic
value that identifies the current thread whatever it is).
2019-05-11 13:53:31 -03:00
David Capello
2eba51a62d Fix minor warning 2019-05-11 13:42:50 -03:00
David Capello
85ce7eea6e Fix compilation error when ENABLE_UI is undefined 2019-05-08 19:18:19 -03:00
David Capello
bd18248be9 Fix compilation when ENABLE_SCRIPTING is defined 2019-05-08 15:53:55 -03:00
David Capello
7d3e6f2ad3 Update laf module 2019-05-08 14:15:46 -03:00
David Capello
262b8abc90 Temporal fix for filling polygons (at least with regular brushes) 2019-05-08 12:50:30 -03:00
David Capello
87f86ee96c Update laf module 2019-05-08 12:50:14 -03:00
David Capello
dd8a49a19c Add option to disable changing the display color profile depending on the current monitor 2019-05-08 10:55:56 -03:00
David Capello
dd405fa26d Eliminate warning about using a type from an anonymous namespace from another type from a non-anonymous namespace 2019-05-07 15:03:15 -03:00
Gaspar Capello
6afd31698f Fix center of eraser edges is wrong 2019-05-07 10:47:31 -03:00
David Capello
0c6e8de9e5 Double-click opens the slice properties dialog w/Slice tool 2019-05-07 10:33:05 -03:00
David Capello
e8716cbb6e Improve context bar for slice tool (combobox of slices + action buttons) 2019-05-07 10:28:37 -03:00
David Capello
33dc3fd354 Update slice tool shortcut to Shift+C and change ScrollCenter to Shift+Z 2019-05-06 14:16:28 -03:00
David Capello
48450ac79d Add info about TRACEARGS() in src/README.md 2019-05-06 14:15:44 -03:00
David Capello
5d7d01ac49 Update observable module 2019-05-06 14:15:25 -03:00