4940 Commits

Author SHA1 Message Date
David Capello
94b508989e Fix changing opacity of a cel's range
We have to change the range in Timeline before generating a
onActiveSiteChange() so the cel's properties dialog knows the new range
to be used to change the opacity.
2016-08-25 20:21:38 -03:00
David Capello
a5c464102b Fix bug setting layer opacity in properties dialog 2016-08-25 17:59:00 -03:00
David Capello
9e28a56eb3 Fix duplicateLayerAfter() when we drag-and-drop to copy a layer as first item in a different layer group 2016-08-25 17:50:08 -03:00
David Capello
eeb701dc8c Save hierarchy of layers correctly in data recovery backups 2016-08-25 17:40:47 -03:00
David Capello
be704d27f3 Don't list incompatible session in data recovery
An incompatible session is when the backup was done with another
Aseprite version number that the running instance.
2016-08-25 17:40:02 -03:00
David Capello
f527eab3bd Remove unused member variables in crash::Session 2016-08-25 17:38:51 -03:00
David Capello
ee7c4940d0 Fix duplicateLayerBefore() when it's used in last (top) layer 2016-08-25 17:37:29 -03:00
David Capello
7abda70dad Merge branch 'remove-layer-index' into layer-folder 2016-08-25 12:33:31 -03:00
David Capello
f2f1c1008b Add support to move/copy non-adjacent layers/frames
Changes:
* With this patch we finally removed the LayerIndex class and member
  functions to access layers by index (like Sprite::firstLayer/layerLayer
  /layer/indexToLayer/layerToIndex() etc.). As layer groups can be
  expanded/collapsed, it doesn't make sense to use layer index to
  access layers directly from sprite.
* Now we use a layer_t (int) to access a list of browsable layers each
  time we want to iterate visible layers in the timeline.
* Replaced CelsRange() and Sprite::uniqueCels() param with
  SelectedFrames to iterate non-adjacent cels.
* Updated clipboard operations (copy/paste) in timeline to support
  layer groups.
* Updated Timeline control to support selecting multiple layer/frame
  ranges with Ctrl+ or Alt+click (fix #1157)
* Added more test units for DocumentRange operations (mainly for
  non-adjacent ranges).
2016-08-25 12:31:00 -03:00
David Capello
8bc6149798 Add extra checks to SelectedLayers/Frames 2016-08-23 15:12:24 -03:00
David Capello
01af7870ad Add TRACE_CMD to avoid trace output for each Cmd 2016-08-23 13:54:49 -03:00
David Capello
356d88b413 Fix crash in SelectedLayers::displace() when layerDelta is out of bounds 2016-08-23 13:50:35 -03:00
David Capello
b4d423051e Improve error reporting on DocumentRange tests 2016-08-20 13:16:46 -03:00
David Capello
eb43fa93bd Fix crash if the last layer index saved in the doc preferences is out of bounds 2016-08-19 18:51:15 -03:00
David Capello
36719da7b2 Convert SelectedLayers into a class 2016-08-12 18:01:12 -03:00
David Capello
8971c8857a Remove Sprite::countLayers() member function 2016-08-12 14:21:15 -03:00
David Capello
5a2ee4fe1b Avoid layerToIndex/indexToLayer() in DocumentApi + some tests 2016-08-12 13:11:37 -03:00
David Capello
906d76ad41 Add SelectedFrames::displace() member function
We have plans to include a SelectedFrames in DocumentRange to select
non-adjacent frames. This member function will be useful to displace
those frames.
2016-08-12 13:08:22 -03:00
David Capello
b0c168a047 Modify .ase encoder/decoder to avoid LayerIndexes
With this patch we avoid using Sprite::layerToIndex/indexToLayer()
member functions in AseFormat.
2016-08-12 11:27:15 -03:00
David Capello
f4b9f3c322 Use Sprite::allLayersCount/allLayers() when possible 2016-08-11 21:28:45 -03:00
David Capello
e35a26fdeb Replace access to the first sprite layer with Sprite::root()->firstLayer() 2016-08-11 20:51:14 -03:00
David Capello
22203fb4d3 Add SelectedFrames::operator== and != 2016-08-11 15:54:50 -03:00
David Capello
fbc8d72f1f Add doc::are_layers_adjacent() function
It'll be useful to know if a range operation (e.g. restack layers) will
be applied to adjacent layers (i.e. a range of layers like in previous
Aseprite versions), or to a non-adjacent set of layers.
2016-08-11 15:15:53 -03:00
David Capello
13e8840014 Replace document.site.layer preference with a layer_t
Now we save the previously selected layer of each document on its
preferences using the browsable set of layers.
2016-08-11 15:04:15 -03:00
David Capello
b4c63a82e1 Add doc::have_layers_same_parent() 2016-08-11 14:55:18 -03:00
David Capello
e5ef4be54a Add allLayersCount() to LayerGroup and Sprite
This will give us the total number of layers + children.
2016-08-11 14:53:51 -03:00
David Capello
ae91c3d15b Add doc::find_layer_index()
It'll be useful to known the index of a layer inside a list (e.g. a list
of all layers, or a list of all browsable layers, etc.).
2016-08-11 14:30:44 -03:00
David Capello
9fd340751f Add doc::displace_selected_layers() function
This function would be useful for the Timeline to displace the set of
selected layers range when the user drag-and-drop it.
2016-08-11 14:24:23 -03:00
David Capello
866385fe4b Add new layer_t type as a replacement for the old LayerIndex 2016-08-11 14:22:45 -03:00
David Capello
63a7a477ff Fix SelectedFrames::insert() when from > to 2016-08-11 14:11:48 -03:00
David Capello
5950bd7df1 Add SelectedFrames::clear() 2016-08-11 13:45:50 -03:00
David Capello
36bfa1d641 Merge branch 'beta' into layer-folder 2016-07-28 23:02:24 -03:00
David Capello
2d776b9792 Fix webp decoder v1.2-beta1 2016-07-28 13:59:56 -03:00
David Capello
8823f6bf21 Merge branch 'master' into beta 2016-07-28 11:03:56 -03:00
David Capello
000ac2e894 Update FLIC library v1.1.7 2016-07-26 10:24:41 -03:00
David Capello
d89d386185 Update version to 1.1.7-dev 2016-07-25 12:32:04 -03:00
David Capello
97d42de696 Improve image resize algorithm
It might be a possible fix for #502
2016-07-25 12:15:42 -03:00
David Capello
d06e1cf009 Replace App::Exit slot with a base::UniquePtr 2016-07-25 11:47:33 -03:00
David Capello
0c6802cd30 Use grid bounds by default in Import Sprite Sheet (fix #1207) 2016-07-25 11:30:33 -03:00
David Capello
ed7a1ef1cc Fix X/Y/Width/Height fields order in "Import Sprite Sheet" (#1207) 2016-07-25 11:25:11 -03:00
David Capello
5910e94396 Add option to hide full filename paths (fix #1199) 2016-07-25 11:04:16 -03:00
David Capello
7849b8804d Remove unnecessary "inline" keyword 2016-07-22 20:48:24 -03:00
David Capello
4ef9626689 Fix crash when resizing a sprite and there is not enough memory
This patch fixes crashes in background jobs that generate any kind of
exception.
2016-07-22 20:46:29 -03:00
David Capello
2893f98fbd Merge pull request #1204 from pseudogames/pixly3
Fix assert() in pixly encoder/decoder
2016-07-22 12:00:37 -03:00
David Capello
67c9cc54d9 Update clip module 2016-07-21 14:15:11 -03:00
David Capello
d4b0753106 Fix theme UI to show user themes and official themes correctly 2016-07-20 19:03:51 -03:00
Carlo 'zED' Caputo
01dc3e70f7 pixly: fixed assert failure 2016-07-15 17:23:11 -03:00
David Capello
45e3573e67 Merge branch 'new-skia' 2016-07-13 17:01:36 -03:00
David Capello
5dfda3b0f0 Reduce the updated region on OS X (related to #1170) 2016-07-12 17:23:28 -03:00
David Capello
5640277ff7 Don't show checkbox to enable GPU yet 2016-07-12 17:23:05 -03:00