mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
Revert "Fix crash in app::tools::BaseInk::prepareForPointShape" because it breaks other tools functionality (fix #3869)
This commit is contained in:
parent
691f99a291
commit
6ab1b2c653
@ -86,16 +86,6 @@ void DrawingState::initToolLoop(Editor* editor,
|
||||
const ui::MouseMessage* msg,
|
||||
const tools::Pointer& pointer)
|
||||
{
|
||||
// This line was moved here to avoid a crash in app::tools::BaseInk::prepareForPointShape
|
||||
// where m_proc was null when m_delayedMouseMove.onMouseDown was called. Then by calling
|
||||
// prepareLoop we make sure m_proc is properly set before the m_delayedMouseMove.onMouseDown
|
||||
// call (Issue: https://github.com/aseprite/aseprite/issues/3338 )
|
||||
m_toolLoopManager->prepareLoop(pointer);
|
||||
// This line was moved here because the previous prepareLoop call might set the toolLoop
|
||||
// controller to null, which would make the app crash. Then by calling pressButton we make
|
||||
// sure the toolLoop controller is properly set.
|
||||
m_toolLoopManager->pressButton(pointer);
|
||||
|
||||
if (msg)
|
||||
m_delayedMouseMove.onMouseDown(msg);
|
||||
else
|
||||
@ -130,6 +120,9 @@ void DrawingState::initToolLoop(Editor* editor,
|
||||
editor->editorToScreen(pointer.point()));
|
||||
m_mouseDownTime = base::current_tick();
|
||||
|
||||
m_toolLoopManager->prepareLoop(pointer);
|
||||
m_toolLoopManager->pressButton(pointer);
|
||||
|
||||
ASSERT(!m_toolLoopManager->isCanceled());
|
||||
|
||||
editor->captureMouse();
|
||||
|
Loading…
Reference in New Issue
Block a user