[TD]fix disappearing balloon cursor
This commit is contained in:
@@ -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() {}
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ public:
|
||||
virtual void stopClick();
|
||||
|
||||
virtual void placeBalloon(QPoint p);
|
||||
virtual void balloonCursorMovement(QMouseEvent *event);
|
||||
|
||||
protected:
|
||||
virtual void initialize();
|
||||
|
||||
@@ -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) &&
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) &&
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user