diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cpp index 9a8a690..1abe4a9 100644 --- a/toonz/sources/toonz/xshcellviewer.cpp +++ b/toonz/sources/toonz/xshcellviewer.cpp @@ -2440,7 +2440,7 @@ void CellArea::mousePressEvent(QMouseEvent *event) { int c = notes->getNoteCol(i); QPoint xy = m_viewer->positionToXY(CellPosition(r, c)); TPointD pos = notes->getNotePos(i) + TPointD(xy.x(), xy.y()); - QRect rect(pos.x, pos.y, NoteWidth, NoteHeight); + QRect rect = o->rect(PredefinedRect::NOTE_ICON).translated(pos.x, pos.y); if (!rect.contains(event->pos())) continue; setDragTool(XsheetGUI::DragTool::makeNoteMoveTool(m_viewer)); m_viewer->setCurrentNoteIndex(i); @@ -2757,7 +2757,7 @@ void CellArea::mouseDoubleClickEvent(QMouseEvent *event) { int c = notes->getNoteCol(i); QPoint xy = m_viewer->positionToXY(CellPosition(r, c)); TPointD pos = notes->getNotePos(i) + TPointD(xy.x(), xy.y()); - QRect rect(pos.x, pos.y, NoteWidth, NoteHeight); + QRect rect = o->rect(PredefinedRect::NOTE_ICON).translated(pos.x, pos.y); if (!rect.contains(event->pos())) continue; m_viewer->setCurrentNoteIndex(i); m_viewer->getNotesWidget().at(i)->openNotePopup(); @@ -2823,7 +2823,7 @@ void CellArea::contextMenuEvent(QContextMenuEvent *event) { int c = notes->getNoteCol(i); QPoint xy = m_viewer->positionToXY(CellPosition(r, c)); TPointD pos = notes->getNotePos(i) + TPointD(xy.x(), xy.y()); - QRect rect(pos.x, pos.y, NoteWidth, NoteHeight); + QRect rect = o->rect(PredefinedRect::NOTE_ICON).translated(pos.x, pos.y); if (!rect.contains(event->pos())) continue; m_viewer->setCurrentNoteIndex(i); createNoteMenu(menu);