+ fixes #0002433: Window weirdness after changing constraint value in sketcher
This commit is contained in:
parent
4bccc5cc6e
commit
32760491a6
|
@ -191,6 +191,31 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||||
else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) {
|
else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) {
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
|
// issue #0002433: avoid to swallow the UP event if down the
|
||||||
|
// scene graph somewhere a dialog gets opened
|
||||||
|
else if (press) {
|
||||||
|
SbTime tmp = (ev->getTime() - mouseDownConsumedEvent.getTime());
|
||||||
|
float dci = (float)QApplication::doubleClickInterval()/1000.0f;
|
||||||
|
// a double-click?
|
||||||
|
if (tmp.getValue() < dci) {
|
||||||
|
mouseDownConsumedEvent = *event;
|
||||||
|
mouseDownConsumedEvent.setTime(ev->getTime());
|
||||||
|
processed = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mouseDownConsumedEvent.setTime(ev->getTime());
|
||||||
|
// 'ANY' is used to mark that we don't know yet if it will
|
||||||
|
// be a double-click event.
|
||||||
|
mouseDownConsumedEvent.setButton(SoMouseButtonEvent::ANY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!press) {
|
||||||
|
if (mouseDownConsumedEvent.getButton() == SoMouseButtonEvent::BUTTON1) {
|
||||||
|
// now handle the postponed event
|
||||||
|
inherited::processSoEvent(&mouseDownConsumedEvent);
|
||||||
|
mouseDownConsumedEvent.setButton(SoMouseButtonEvent::ANY);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SoMouseButtonEvent::BUTTON2:
|
case SoMouseButtonEvent::BUTTON2:
|
||||||
// If we are in edit mode then simply ignore the RMB events
|
// If we are in edit mode then simply ignore the RMB events
|
||||||
|
|
|
@ -227,6 +227,31 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||||
else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) {
|
else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) {
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
|
// issue #0002433: avoid to swallow the UP event if down the
|
||||||
|
// scene graph somewhere a dialog gets opened
|
||||||
|
else if (press) {
|
||||||
|
SbTime tmp = (ev->getTime() - mouseDownConsumedEvent.getTime());
|
||||||
|
float dci = (float)QApplication::doubleClickInterval()/1000.0f;
|
||||||
|
// a double-click?
|
||||||
|
if (tmp.getValue() < dci) {
|
||||||
|
mouseDownConsumedEvent = *event;
|
||||||
|
mouseDownConsumedEvent.setTime(ev->getTime());
|
||||||
|
processed = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mouseDownConsumedEvent.setTime(ev->getTime());
|
||||||
|
// 'ANY' is used to mark that we don't know yet if it will
|
||||||
|
// be a double-click event.
|
||||||
|
mouseDownConsumedEvent.setButton(SoMouseButtonEvent::ANY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!press) {
|
||||||
|
if (mouseDownConsumedEvent.getButton() == SoMouseButtonEvent::BUTTON1) {
|
||||||
|
// now handle the postponed event
|
||||||
|
inherited::processSoEvent(&mouseDownConsumedEvent);
|
||||||
|
mouseDownConsumedEvent.setButton(SoMouseButtonEvent::ANY);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SoMouseButtonEvent::BUTTON2:
|
case SoMouseButtonEvent::BUTTON2:
|
||||||
// If we are in edit mode then simply ignore the RMB events
|
// If we are in edit mode then simply ignore the RMB events
|
||||||
|
|
|
@ -218,6 +218,31 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||||
processed = true;
|
processed = true;
|
||||||
this->lockrecenter = true;
|
this->lockrecenter = true;
|
||||||
}
|
}
|
||||||
|
// issue #0002433: avoid to swallow the UP event if down the
|
||||||
|
// scene graph somewhere a dialog gets opened
|
||||||
|
else if (press) {
|
||||||
|
SbTime tmp = (ev->getTime() - mouseDownConsumedEvent.getTime());
|
||||||
|
float dci = (float)QApplication::doubleClickInterval()/1000.0f;
|
||||||
|
// a double-click?
|
||||||
|
if (tmp.getValue() < dci) {
|
||||||
|
mouseDownConsumedEvent = *event;
|
||||||
|
mouseDownConsumedEvent.setTime(ev->getTime());
|
||||||
|
processed = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mouseDownConsumedEvent.setTime(ev->getTime());
|
||||||
|
// 'ANY' is used to mark that we don't know yet if it will
|
||||||
|
// be a double-click event.
|
||||||
|
mouseDownConsumedEvent.setButton(SoMouseButtonEvent::ANY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!press) {
|
||||||
|
if (mouseDownConsumedEvent.getButton() == SoMouseButtonEvent::BUTTON1) {
|
||||||
|
// now handle the postponed event
|
||||||
|
inherited::processSoEvent(&mouseDownConsumedEvent);
|
||||||
|
mouseDownConsumedEvent.setButton(SoMouseButtonEvent::ANY);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SoMouseButtonEvent::BUTTON2:
|
case SoMouseButtonEvent::BUTTON2:
|
||||||
// If we are in edit mode then simply ignore the RMB events
|
// If we are in edit mode then simply ignore the RMB events
|
||||||
|
|
|
@ -276,6 +276,9 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SbBool processSoEvent(const SoEvent * const ev);
|
SbBool processSoEvent(const SoEvent * const ev);
|
||||||
|
|
||||||
|
private:
|
||||||
|
SoMouseButtonEvent mouseDownConsumedEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GuiExport CADNavigationStyle : public UserNavigationStyle {
|
class GuiExport CADNavigationStyle : public UserNavigationStyle {
|
||||||
|
@ -293,6 +296,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SbBool lockButton1;
|
SbBool lockButton1;
|
||||||
|
SoMouseButtonEvent mouseDownConsumedEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GuiExport BlenderNavigationStyle : public UserNavigationStyle {
|
class GuiExport BlenderNavigationStyle : public UserNavigationStyle {
|
||||||
|
@ -310,6 +314,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SbBool lockButton1;
|
SbBool lockButton1;
|
||||||
|
SoMouseButtonEvent mouseDownConsumedEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GuiExport MayaGestureNavigationStyle : public UserNavigationStyle {
|
class GuiExport MayaGestureNavigationStyle : public UserNavigationStyle {
|
||||||
|
@ -348,6 +353,9 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SbBool processSoEvent(const SoEvent * const ev);
|
SbBool processSoEvent(const SoEvent * const ev);
|
||||||
|
|
||||||
|
private:
|
||||||
|
SoMouseButtonEvent mouseDownConsumedEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GuiExport GestureNavigationStyle : public UserNavigationStyle {
|
class GuiExport GestureNavigationStyle : public UserNavigationStyle {
|
||||||
|
@ -387,6 +395,8 @@ public:
|
||||||
protected:
|
protected:
|
||||||
SbBool processSoEvent(const SoEvent * const ev);
|
SbBool processSoEvent(const SoEvent * const ev);
|
||||||
|
|
||||||
|
private:
|
||||||
|
SoMouseButtonEvent mouseDownConsumedEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Gui
|
} // namespace Gui
|
||||||
|
|
|
@ -187,6 +187,31 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||||
else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) {
|
else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) {
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
|
// issue #0002433: avoid to swallow the UP event if down the
|
||||||
|
// scene graph somewhere a dialog gets opened
|
||||||
|
else if (press) {
|
||||||
|
SbTime tmp = (ev->getTime() - mouseDownConsumedEvent.getTime());
|
||||||
|
float dci = (float)QApplication::doubleClickInterval()/1000.0f;
|
||||||
|
// a double-click?
|
||||||
|
if (tmp.getValue() < dci) {
|
||||||
|
mouseDownConsumedEvent = *event;
|
||||||
|
mouseDownConsumedEvent.setTime(ev->getTime());
|
||||||
|
processed = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mouseDownConsumedEvent.setTime(ev->getTime());
|
||||||
|
// 'ANY' is used to mark that we don't know yet if it will
|
||||||
|
// be a double-click event.
|
||||||
|
mouseDownConsumedEvent.setButton(SoMouseButtonEvent::ANY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!press) {
|
||||||
|
if (mouseDownConsumedEvent.getButton() == SoMouseButtonEvent::BUTTON1) {
|
||||||
|
// now handle the postponed event
|
||||||
|
inherited::processSoEvent(&mouseDownConsumedEvent);
|
||||||
|
mouseDownConsumedEvent.setButton(SoMouseButtonEvent::ANY);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SoMouseButtonEvent::BUTTON2:
|
case SoMouseButtonEvent::BUTTON2:
|
||||||
// If we are in edit mode then simply ignore the RMB events
|
// If we are in edit mode then simply ignore the RMB events
|
||||||
|
|
|
@ -195,6 +195,31 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||||
else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) {
|
else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) {
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
|
// issue #0002433: avoid to swallow the UP event if down the
|
||||||
|
// scene graph somewhere a dialog gets opened
|
||||||
|
else if (press) {
|
||||||
|
SbTime tmp = (ev->getTime() - mouseDownConsumedEvent.getTime());
|
||||||
|
float dci = (float)QApplication::doubleClickInterval()/1000.0f;
|
||||||
|
// a double-click?
|
||||||
|
if (tmp.getValue() < dci) {
|
||||||
|
mouseDownConsumedEvent = *event;
|
||||||
|
mouseDownConsumedEvent.setTime(ev->getTime());
|
||||||
|
processed = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mouseDownConsumedEvent.setTime(ev->getTime());
|
||||||
|
// 'ANY' is used to mark that we don't know yet if it will
|
||||||
|
// be a double-click event.
|
||||||
|
mouseDownConsumedEvent.setButton(SoMouseButtonEvent::ANY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!press) {
|
||||||
|
if (mouseDownConsumedEvent.getButton() == SoMouseButtonEvent::BUTTON1) {
|
||||||
|
// now handle the postponed event
|
||||||
|
inherited::processSoEvent(&mouseDownConsumedEvent);
|
||||||
|
mouseDownConsumedEvent.setButton(SoMouseButtonEvent::ANY);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SoMouseButtonEvent::BUTTON2:
|
case SoMouseButtonEvent::BUTTON2:
|
||||||
// If we are in edit mode then simply ignore the RMB events
|
// If we are in edit mode then simply ignore the RMB events
|
||||||
|
|
Loading…
Reference in New Issue
Block a user