mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-25 15:34:13 +01:00
Report jump: put the mouse pointer on the end jumped to
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 1m41s
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 1m41s
A double click on a linked folio report showed the other end's folio and highlighted it, but left the mouse pointer where it was, on every platform, while only Wayland forbids a program to move it. On Windows, X11 and macOS the pointer is now put on the end jumped to, once the folio shown has its size (next turn of the event loop), so that a second double click jumps back. On Wayland the highlight alone still shows where the jump landed. The pointing hand over a report's label text also stayed after a click: mousePressEvent() puts the text colour back, and the cursor was only unset with the colour in hoverLeaveEvent(). It is now always unset when the mouse leaves the text.
This commit is contained in:
@@ -778,9 +778,10 @@ void DynamicElementTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
setDefaultTextColor(m_user_color);
|
||||
m_user_color = QColor(); //m_user_color is now invalid
|
||||
unsetCursor();
|
||||
}
|
||||
|
||||
//Out of the test above: a click (mousePressEvent()) already put
|
||||
//the colour back, and the hand would stay after it
|
||||
unsetCursor();
|
||||
}
|
||||
|
||||
void DynamicElementTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
|
||||
Reference in New Issue
Block a user