XGUI_PropertyPanel::activateNextWidget: the function is not finished yet, only setFocus is called. During this setFocus, the WidgetEditor leads to restart of the distance operation. When the loop returned back to the activateNextWidget, aNextWidget=0(sometimes or trash) and the empty widget is activated(after the distance operation has been already started with existed active first widget).
activateWidget(NULL);
return;
}
- ModuleBase_ModelWidget* aNextWidget = 0;
QList<ModuleBase_ModelWidget*>::const_iterator anIt = myWidgets.begin(), aLast = myWidgets.end();
bool isFoundWidget = false;
activateWindow();
- for (; anIt != aLast && !aNextWidget; anIt++) {
+ for (; anIt != aLast; anIt++) {
if (isFoundWidget || !theWidget) {
if ((*anIt)->focusTo()) {
- aNextWidget = *anIt;
+ return;
}
}
isFoundWidget = (*anIt) == theWidget;
}
- // Normaly focusTo is enough to activate widget
- // here is a special case on mouse click in the viewer
- if(aNextWidget == NULL) {
- activateWidget(aNextWidget);
- }
+ activateWidget(NULL);
}
void XGUI_PropertyPanel::activateNextWidget()