[TD]fix disappearing balloon cursor

This commit is contained in:
wandererfan
2023-11-24 17:24:58 -05:00
committed by WandererFan
parent ae3144c7ce
commit 5edda94043
12 changed files with 30 additions and 11 deletions

View File

@@ -225,7 +225,8 @@ void QGVNavStyle::handleMouseMoveEvent(QMouseEvent* event)
{
// Base::Console().Message("QGVNS::handleMouseMoveEvent()\n");
if (getViewer()->isBalloonPlacing()) {
getViewer()->setBalloonCursorPos(event->pos());
balloonCursorMovement(event);
return;
}
if (panningActive) {
@@ -398,6 +399,13 @@ void QGVNavStyle::placeBalloon(QPoint p)
getViewer()->setBalloonPlacing(false);
}
void QGVNavStyle::balloonCursorMovement(QMouseEvent *event)
{
getViewer()->setBalloonCursorPos(event->pos());
event->accept();
return;
}
//****************************************
KeyCombination::KeyCombination() {}

View File

@@ -96,6 +96,7 @@ public:
virtual void stopClick();
virtual void placeBalloon(QPoint p);
virtual void balloonCursorMovement(QMouseEvent *event);
protected:
virtual void initialize();

View File

@@ -64,7 +64,8 @@ void QGVNavStyleBlender::handleMouseMoveEvent(QMouseEvent *event)
// QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier));
if (getViewer()->isBalloonPlacing()) {
getViewer()->setBalloonCursorPos(event->pos());
balloonCursorMovement(event);
return;
}
if ((QGuiApplication::mouseButtons() & Qt::LeftButton) &&

View File

@@ -83,7 +83,8 @@ void QGVNavStyleCAD::handleMousePressEvent(QMouseEvent *event)
void QGVNavStyleCAD::handleMouseMoveEvent(QMouseEvent *event)
{
if (getViewer()->isBalloonPlacing()) {
getViewer()->setBalloonCursorPos(event->pos());
balloonCursorMovement(event);
return;
}
//if the mouse moves between press and release, then it isn't a click

View File

@@ -53,7 +53,8 @@ void QGVNavStyleGesture::handleMousePressEvent(QMouseEvent *event)
void QGVNavStyleGesture::handleMouseMoveEvent(QMouseEvent *event)
{
if (getViewer()->isBalloonPlacing()) {
getViewer()->setBalloonCursorPos(event->pos());
balloonCursorMovement(event);
return;
}
//if the mouse moves between press and release, then it isn't a click

View File

@@ -58,7 +58,8 @@ void QGVNavStyleInventor::handleMousePressEvent(QMouseEvent *event)
void QGVNavStyleInventor::handleMouseMoveEvent(QMouseEvent *event)
{
if (getViewer()->isBalloonPlacing()) {
getViewer()->setBalloonCursorPos(event->pos());
balloonCursorMovement(event);
return;
}
if ((QGuiApplication::mouseButtons() & Qt::LeftButton) &&

View File

@@ -66,7 +66,8 @@ void QGVNavStyleMaya::handleMousePressEvent(QMouseEvent *event)
void QGVNavStyleMaya::handleMouseMoveEvent(QMouseEvent *event)
{
if (getViewer()->isBalloonPlacing()) {
getViewer()->setBalloonCursorPos(event->pos());
balloonCursorMovement(event);
return;
}
//pan mode alt + MMB + mouse movement

View File

@@ -66,7 +66,8 @@ void QGVNavStyleOCC::handleMousePressEvent(QMouseEvent *event)
void QGVNavStyleOCC::handleMouseMoveEvent(QMouseEvent *event)
{
if (getViewer()->isBalloonPlacing()) {
getViewer()->setBalloonCursorPos(event->pos());
balloonCursorMovement(event);
return;
}
//pan mode 1 - MMB + mouse movement

View File

@@ -62,7 +62,8 @@ void QGVNavStyleOpenSCAD::handleMousePressEvent(QMouseEvent *event)
void QGVNavStyleOpenSCAD::handleMouseMoveEvent(QMouseEvent *event)
{
if (getViewer()->isBalloonPlacing()) {
getViewer()->setBalloonCursorPos(event->pos());
balloonCursorMovement(event);
return;
}
//if the mouse moves between press and release, then it isn't a click

View File

@@ -53,7 +53,8 @@ void QGVNavStyleRevit::handleMousePressEvent(QMouseEvent *event)
void QGVNavStyleRevit::handleMouseMoveEvent(QMouseEvent *event)
{
if (getViewer()->isBalloonPlacing()) {
getViewer()->setBalloonCursorPos(event->pos());
balloonCursorMovement(event);
return;
}
//if the mouse moves between press and release, then it isn't a click

View File

@@ -51,7 +51,8 @@ void QGVNavStyleTinkerCAD::handleMousePressEvent(QMouseEvent *event)
void QGVNavStyleTinkerCAD::handleMouseMoveEvent(QMouseEvent *event)
{
if (getViewer()->isBalloonPlacing()) {
getViewer()->setBalloonCursorPos(event->pos());
balloonCursorMovement(event);
return;
}
//pan mode - MMB + move

View File

@@ -85,7 +85,8 @@ void QGVNavStyleTouchpad::handleKeyReleaseEvent(QKeyEvent *event)
void QGVNavStyleTouchpad::handleMouseMoveEvent(QMouseEvent *event)
{
if (getViewer()->isBalloonPlacing()) {
getViewer()->setBalloonCursorPos(event->pos());
balloonCursorMovement(event);
return;
}
if (QApplication::keyboardModifiers() == Qt::ShiftModifier) {