- if (!hasSketchPlane()) {
- }
- else {
- if (!theSelected.empty()) {
- XGUI_ViewerPrs aPrs = theSelected.front();
- if (!aPrs.owner().IsNull()) {
- Handle(AIS_DimensionOwner) anOwner = Handle(AIS_DimensionOwner)::DownCast(aPrs.owner());
- if (!anOwner.IsNull() && anOwner->SelectionMode() == AIS_DSM_Text) {
- Handle(SelectMgr_SelectableObject) anObject = anOwner->Selectable();
- double aValue = 0;
- if (!anObject.IsNull()) {
- Handle(AIS_LengthDimension) aLenDim = Handle(AIS_LengthDimension)::DownCast(anObject);
- if (!aLenDim.IsNull())
- aValue = aLenDim->GetValue();
- }
-
- QLineEdit* aLine = new QLineEdit();
- QPoint aViewPos = theEvent->globalPos();
- QPoint aLinePos(aViewPos.x(), aViewPos.y());
- aLine->move(aLinePos);
- aLine->setText(QString::number(aValue));
- aLine->show();
- }
+ if (hasSketchPlane()) {
+ /// TODO: OCC bug: 25034 - the highlighted list should be filled not only for AIS_Shape
+ /// but for other IO, for example constraint dimensions.
+ /// It is empty and we have to use the process mouse release to start edition operation
+ /// for these objects
+ if (theSelected.size() == 1) {
+ ObjectPtr aObject = theSelected.front().object();
+ if (aObject) {
+ restartOperation(PartSet_OperationFeatureEdit::Type(), aObject);