Gui: Fix selection in Blender, CAD and Revit style
This commit is contained in:
committed by
Chris Hennes
parent
e704dca1fc
commit
477702dfa8
@@ -131,6 +131,9 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||
this->centerTime = ev->getTime();
|
||||
processed = true;
|
||||
}
|
||||
else if (!press && (this->currentmode == NavigationStyle::DRAGGING)) {
|
||||
processed = true;
|
||||
}
|
||||
else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) {
|
||||
processed = true;
|
||||
}
|
||||
@@ -245,12 +248,15 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||
// The left mouse button has been released right now
|
||||
if (this->lockButton1) {
|
||||
this->lockButton1 = false;
|
||||
if (curmode != NavigationStyle::SELECTION) {
|
||||
processed = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BUTTON1DOWN:
|
||||
case CTRLDOWN|BUTTON1DOWN:
|
||||
// make sure not to change the selection when stopping spinning
|
||||
if (!viewer->isEditing() && (curmode == NavigationStyle::SPINNING || this->lockButton1))
|
||||
if (curmode == NavigationStyle::SPINNING || this->lockButton1 && curmode != NavigationStyle::SELECTION)
|
||||
newmode = NavigationStyle::IDLE;
|
||||
else
|
||||
newmode = NavigationStyle::SELECTION;
|
||||
|
||||
@@ -253,11 +253,14 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||
// The left mouse button has been released right now
|
||||
if (this->lockButton1) {
|
||||
this->lockButton1 = false;
|
||||
if (curmode != NavigationStyle::SELECTION) {
|
||||
processed = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BUTTON1DOWN:
|
||||
// make sure not to change the selection when stopping spinning
|
||||
if (!viewer->isEditing() && (curmode == NavigationStyle::SPINNING || this->lockButton1))
|
||||
if (curmode == NavigationStyle::SPINNING || this->lockButton1 && curmode != NavigationStyle::SELECTION)
|
||||
newmode = NavigationStyle::IDLE;
|
||||
else
|
||||
newmode = NavigationStyle::SELECTION;
|
||||
|
||||
@@ -130,6 +130,9 @@ SbBool RevitNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||
this->centerTime = ev->getTime();
|
||||
processed = true;
|
||||
}
|
||||
else if (!press && (this->currentmode == NavigationStyle::DRAGGING)) {
|
||||
processed = true;
|
||||
}
|
||||
else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) {
|
||||
processed = true;
|
||||
}
|
||||
@@ -242,12 +245,15 @@ SbBool RevitNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||
// The left mouse button has been released right now
|
||||
if (this->lockButton1) {
|
||||
this->lockButton1 = false;
|
||||
if (curmode != NavigationStyle::SELECTION) {
|
||||
processed = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BUTTON1DOWN:
|
||||
case CTRLDOWN|BUTTON1DOWN:
|
||||
// make sure not to change the selection when stopping spinning
|
||||
if (!viewer->isEditing() && (curmode == NavigationStyle::SPINNING || this->lockButton1))
|
||||
if (curmode == NavigationStyle::SPINNING || this->lockButton1 && curmode != NavigationStyle::SELECTION)
|
||||
newmode = NavigationStyle::IDLE;
|
||||
else
|
||||
newmode = NavigationStyle::SELECTION;
|
||||
|
||||
Reference in New Issue
Block a user