[TD]fix uncommanded leader position change

This commit is contained in:
wandererfan
2025-09-15 16:26:01 -04:00
committed by Chris Hennes
parent 140de440cc
commit 919f5fd265
3 changed files with 8 additions and 1 deletions

View File

@@ -73,6 +73,9 @@ public:
void drawBorder() override;
void updateView(bool update = false) override;
// leaders are not draggable
void dragFinished() override { };
virtual TechDraw::DrawLeaderLine* getLeaderFeature();
void startPathEdit();

View File

@@ -228,6 +228,10 @@ QVariant QGIView::itemChange(GraphicsItemChange change, const QVariant &value)
return QGraphicsItemGroup::itemChange(change, value);
}
//! The default behaviour here only applies to views whose (X, Y) describes a position on the page.
//! Others, like QGILeaderLine whose (X, Y) describes a position within a view's boundary and is not
//! draggable, should override this method.
void QGIView::dragFinished()
{
if (!viewObj) {

View File

@@ -178,7 +178,7 @@ protected:
QGIView* getQGIVByName(std::string name) const;
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
void dragFinished();
virtual void dragFinished();
// Preselection events:
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;