mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-22 14:24:13 +02:00
Report jump: show the target's whole folio, shade its texts too
Feedback on a real plan: zooming in on the end jumped to was too much. A jump now shows the target's folio whole, as a page (the view's fit), selects the target and shades it and its texts blue for three seconds, so that the eye finds the label too. One function, Element::jumpTo(), serves the double click on the arrow and on the text. The mouse pointer is not moved onto the target: Wayland does not let a program move the pointer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -785,6 +785,9 @@ void DynamicElementTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
|
||||
void DynamicElementTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
if (m_jump_highlight)
|
||||
painter->fillRect(boundingRect(), QColor(69, 137, 255, 90));
|
||||
|
||||
DiagramTextItem::paint(painter, option, widget);
|
||||
|
||||
if (m_frame)
|
||||
@@ -1635,10 +1638,18 @@ void DynamicElementTextItem::zoomToLinkedElement()
|
||||
setSelected(false);
|
||||
ungrabMouse();
|
||||
|
||||
QetGraphicsItem::showItem(zoomed_element);
|
||||
Element::jumpTo(zoomed_element);
|
||||
}
|
||||
}
|
||||
|
||||
void DynamicElementTextItem::setJumpHighlight(bool on)
|
||||
{
|
||||
if (on == m_jump_highlight)
|
||||
return;
|
||||
m_jump_highlight = on;
|
||||
update();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DynamicElementTextItem::parentElementRotationChanged
|
||||
* Called when the parent element is rotated
|
||||
|
||||
Reference in New Issue
Block a user