Prevent passing the focus to a spinbox when it shouldn't.
In some DSH some mode (seekSecond for example) don't have onViewParameter. In this case it would wrongly try to give focus to the previous spinbox with focus.
This commit is contained in:
@@ -406,7 +406,9 @@ protected:
|
||||
virtual void afterEnforceControlParameters()
|
||||
{
|
||||
// Give focus to current on-view parameter. In case user interacted outside of 3dview.
|
||||
setFocusToOnViewParameter(onViewIndexWithFocus);
|
||||
if (onViewIndexWithFocus >= 0) {
|
||||
setFocusToOnViewParameter(onViewIndexWithFocus);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void doConstructionMethodChanged()
|
||||
@@ -489,6 +491,8 @@ protected:
|
||||
void setModeOnViewParameters()
|
||||
{
|
||||
bool firstOfMode = true;
|
||||
onViewIndexWithFocus = -1;
|
||||
|
||||
for (size_t i = 0; i < onViewParameters.size(); i++) {
|
||||
if (!isOnViewParameterOfCurrentMode(i)) {
|
||||
onViewParameters[i]->stopEdit();
|
||||
|
||||
Reference in New Issue
Block a user