aControlLay->setStretch(1, 1);
connect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged()));
-
- mySpinBox->installEventFilter(this);
}
ModuleBase_WidgetDoubleValue::~ModuleBase_WidgetDoubleValue()
connect(myYSpin, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged()));
}
- myXSpin->installEventFilter(this);
- myYSpin->installEventFilter(this);
}
ModuleBase_WidgetPoint2D::~ModuleBase_WidgetPoint2D()
myTextLine = new QLineEdit(myContainer);
myTextLine->setReadOnly(true);
myTextLine->setToolTip(aToolTip);
- myTextLine->installEventFilter(this);
myBasePalet = myTextLine->palette();
myInactivePalet = myBasePalet;
activateSelection(true);
}
return ModuleBase_ModelWidget::eventFilter(theObj, theEvent);
-}
\ No newline at end of file
+}
bool PartSet_OperationFeatureCreate::canBeCommitted() const
{
- if (PartSet_OperationSketchBase::canBeCommitted())
- return !myActiveWidget;
+ if (PartSet_OperationSketchBase::canBeCommitted()) {
+ //if(myActiveWidget && !myActiveWidget->isComputedDefault()) {
+ return isValid();
+ }
return false;
}
emit activateNextWidget(myActiveWidget);
}
- if (commit() && !isClosedContour) {
- // if the point creation is finished, the next mouse release should commit the modification
- // the next release can happens by double click in the viewer
- restartOperation(feature()->getKind(), feature());
- return;
+ if (myActiveWidget == NULL) {
+ if(commit() && !isClosedContour) {
+ // if the point creation is finished, the next mouse release should commit the modification
+ // the next release can happens by double click in the viewer
+ restartOperation(feature()->getKind(), feature());
+ }
}
}
break;
case Qt::Key_Return:
case Qt::Key_Enter: {
- if(anOperation) {
- anOperation->activateNextToCurrentWidget();
- }
commitOperation();
}
break;
void XGUI_PropertyPanel::onActivateNextWidget(ModuleBase_ModelWidget* theWidget)
{
+ QObject* aSender = sender();
ModuleBase_ModelWidget* aNextWidget = 0;
QList<ModuleBase_ModelWidget*>::const_iterator anIt = myWidgets.begin(), aLast = myWidgets.end();
bool isFoundWidget = false;