There is a moment inside Timeline::updateUsingEditor() where the
TimelineAdapter is nullptr between detachDocument() and the
updateTimelineAdapter() call, so just using a m_editor->getSite() was
going to ask for the timeline adapter if the selection was kept intact
("Keep selection" option enabled).
With this patch we simplify updateUsingEditor() just avoiding the
getSite() call at all (using the Editor fields directly) and handling
the special case where we already are in the same editor as a fast path.
With the combination of 8b0b1d8d1e2624eaa8433df58b83845902cd7975
(allowing transactions in docs without context) and
be17c4832405be44193a4d24268c38da80369743 (getting the active DocRange
from Doc context), we were getting a crash accessing a nullptr context.
In this way the user cannot use Ctrl key to try to move a cel and get
an error that the sprite is locked so we cannot move the cel. Actually
we shouldn't be able to move the cel when we're using the Editor for
preview purposes (FilterWindow / WindowWithHand).
This issue was reported in #4465, and created for the new
Dialog:show{hand=true} API mainly.
Prior to this fix, Aseprite would crash when using
Dynamics + Dithering by simply clicking on the canvas.
The regression has been introduced in b7aa5d5 'Add Diagonal Symmetry'.
- Now we have a view::RealRange (with real frames, fr_t) and a
view::VirtualRange (with virtual frames, columns, col_t). The timeline
uses a virtual range internally and makes the conversion to a real
range when it's appropiated (e.g. to execute an old DocRange operation
using ranges with real frames).
- Added Context::range() to access to the real selected range
instead of accessing directly to the timeline. In this way commands
that were using the DocRange can access to the real range using the
context, instead of the timeline's virtual range.
- Added a new ShowTagTimelineAdapter that can show just one tag in the
timeline filtering out/hiding all other frames/tags.
We need an extra code layer (view::TimelineAdapter) to convert between
old "real frames" (view::fr_t = doc::frame_t) and new "virtual
frames" (view::col_t). These new types are strongly-typed ints (enum
classes).
* Moved app::DocRange to view::Range
* Moved range_utils to view/cels.cpp
* Moved layer_utils to view/layers.cpp
* Created more functions in app::Site to access selected cels
(they use the functions from view/cels.h)
* Re-use the ToolStrip widget/logic to show the list of hidden
tools. This fixes some issues with the size/alignment of the group
and keep consistent with the current look & feel.
* Simplify ToolStrip logic using a vector of tools inside instead of
iterating the whole toolbox/filtering the group.
* Fixed the "overflow" button style to be highlighted when we hover
the mouse on it.
* Don't create one "Show more..." tooltip window for each mouse move
above the button.
* Show tooltips for tools inside the overflow popup window.
* Clicking the button again closes the group.
GitHub doesn't require this .git at the end of the URL but it's the
URL they gave in the "Clone" button when the HTTPS protocol is
selected. Just to keep all URLs consistent.