mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-15 20:42:40 +00:00
Timeline: Fix problem clicking first and second frame
This commit is contained in:
parent
d76f6f6716
commit
4946dd5ebb
@ -459,17 +459,18 @@ bool Timeline::onProcessMessage(Message* msg)
|
|||||||
}
|
}
|
||||||
// Is the mouse on the headers?
|
// Is the mouse on the headers?
|
||||||
else if (mousePos.y < HDRSIZE) {
|
else if (mousePos.y < HDRSIZE) {
|
||||||
if (getPartBounds(A_PART_HEADER_EYE).contains(mousePos))
|
if (mousePos.x < m_separator_x) {
|
||||||
hot_part = A_PART_HEADER_EYE;
|
if (getPartBounds(A_PART_HEADER_EYE).contains(mousePos))
|
||||||
else if (getPartBounds(A_PART_HEADER_PADLOCK).contains(mousePos))
|
hot_part = A_PART_HEADER_EYE;
|
||||||
hot_part = A_PART_HEADER_PADLOCK;
|
else if (getPartBounds(A_PART_HEADER_PADLOCK).contains(mousePos))
|
||||||
else if (getPartBounds(A_PART_HEADER_GEAR).contains(mousePos))
|
hot_part = A_PART_HEADER_PADLOCK;
|
||||||
hot_part = A_PART_HEADER_GEAR;
|
else if (getPartBounds(A_PART_HEADER_GEAR).contains(mousePos))
|
||||||
else if (getPartBounds(A_PART_HEADER_ONIONSKIN).contains(mousePos))
|
hot_part = A_PART_HEADER_GEAR;
|
||||||
hot_part = A_PART_HEADER_ONIONSKIN;
|
else if (getPartBounds(A_PART_HEADER_ONIONSKIN).contains(mousePos))
|
||||||
else if (getPartBounds(A_PART_HEADER_LAYER).contains(mousePos))
|
hot_part = A_PART_HEADER_ONIONSKIN;
|
||||||
hot_part = A_PART_HEADER_LAYER;
|
else if (getPartBounds(A_PART_HEADER_LAYER).contains(mousePos))
|
||||||
// Is on a frame header?
|
hot_part = A_PART_HEADER_LAYER;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
hot_part = A_PART_HEADER_FRAME;
|
hot_part = A_PART_HEADER_FRAME;
|
||||||
hot_frame = FrameNumber((mousePos.x
|
hot_frame = FrameNumber((mousePos.x
|
||||||
@ -1360,7 +1361,7 @@ gfx::Rect Timeline::getPartBounds(int part, int layer, FrameNumber frame) const
|
|||||||
|
|
||||||
case A_PART_HEADER_LAYER:
|
case A_PART_HEADER_LAYER:
|
||||||
return gfx::Rect(FRMSIZE*4, 0,
|
return gfx::Rect(FRMSIZE*4, 0,
|
||||||
m_separator_x - FRMSIZE*2,
|
m_separator_x - FRMSIZE*4,
|
||||||
HDRSIZE);
|
HDRSIZE);
|
||||||
|
|
||||||
case A_PART_HEADER_FRAME:
|
case A_PART_HEADER_FRAME:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user