mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-03 10:34:14 +02:00
Add live cursor-coordinate readout to the element editor status bar (#580)
Displays the cursor's scene position (same grid units as the parts' X/Y property spinboxes) in a permanent status bar label, updated on every mouse move. Addresses the overlapping-node mis-click case from the originating forum report: with a live readout, precise pointing no longer requires guessing against nearby z-ordered points. ElementScene::mouseMoveEvent already computed the (optionally grid-snapped) scene position on every move; it now also emits it via a new mouseMoved(QPointF) signal, which QETElementEditor's status bar label subscribes to.
This commit is contained in:
@@ -179,6 +179,8 @@ class ElementScene : public QGraphicsScene
|
||||
void elementInfoChanged();
|
||||
/// Signal emitted when the element type changes
|
||||
void elementTypeChanged();
|
||||
/// Signal emitted with the current cursor position (scene coordinates) on every mouse move
|
||||
void mouseMoved(const QPointF &pos);
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(ElementScene::ItemOptions)
|
||||
|
||||
Reference in New Issue
Block a user