if ( aProp->GetNumber() == 0 )
return;
aMenu.clear();
+ // Edit annotation action
+ CAM_Application* anApp = dynamic_cast<CAM_Application*>(myStudy->application());
+ GeometryGUI* aModule = dynamic_cast<GeometryGUI*>(anApp->activeModule());
+ QAction* anEditAction = aModule->action(GEOMOp::OpEditAnnotation);
+ if ( anEditAction )
+ aMenu.addAction( anEditAction );
+ // Show/Hide actions
if ( aProp->GetIsVisible( idFromItem( anItem ) ) )
aMenu.addAction( myActions[GEOMOp::OpHide] );
else
<source>STB_ANNOTATION</source>
<translation>Annotation</translation>
</message>
+ <message>
+ <source>TOP_EDIT_ANNOTATION</source>
+ <translation>Edit Annotation</translation>
+ </message>
+ <message>
+ <source>MEN_EDIT_ANNOTATION</source>
+ <translation>Edit</translation>
+ </message>
+ <message>
+ <source>STB_EDIT_ANNOTATION</source>
+ <translation>Edit Annotation</translation>
+ </message>
<message>
<source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
<translation>Show dependency tree</translation>
case GEOMOp::OpFastCheckInters: // MENU MEASURE - FAST CHECK INTERSECTIONS
case GEOMOp::OpManageDimensions: // MENU MEASURE - MANAGE DIMENSIONS
case GEOMOp::OpAnnotation: // MENU MEASURE - ANNOTATION
+ case GEOMOp::OpEditAnnotation: // POPUP MENU - EDIT ANNOTATION
#ifndef DISABLE_PLOT2DVIEWER
case GEOMOp::OpShapeStatistics: // MENU MEASURE - SHAPE STATISTICS
#endif
createGeomAction( GEOMOp::OpAngle, "MEASURE_ANGLE" );
createGeomAction( GEOMOp::OpManageDimensions, "MANAGE_DIMENSIONS" );
createGeomAction( GEOMOp::OpAnnotation, "ANNOTATION" );
+ createGeomAction( GEOMOp::OpEditAnnotation, "EDIT_ANNOTATION" );
createGeomAction( GEOMOp::OpTolerance, "TOLERANCE" );
createGeomAction( GEOMOp::OpWhatIs, "WHAT_IS" );
mgr->setRule( action( GEOMOp::OpNoAutoColor ), autoColorPrefix + " and isAutoColor=true", QtxPopupMgr::VisibleRule );
mgr->insert( separator(), -1, -1 ); // -----------
+ mgr->insert( action( GEOMOp::OpEditAnnotation ), -1, -1 ); // edit annotation
+ mgr->setRule( action( GEOMOp::OpEditAnnotation ), QString("($component={'GEOM'}) and type='Shape' and selcount=1"), QtxPopupMgr::VisibleRule );
+ mgr->insert( separator(), -1, -1 ); // -----------
+
QString canDisplay = "($component={'GEOM'}) and (selcount>0) and ({true} in $canBeDisplayed) ",
onlyComponent = "((type='Component') and selcount=1)",
rule = canDisplay + "and ((($type in {%1}) and( %2 )) or " + onlyComponent + ")",
case GEOMOp::OpAngle:
dlg = new MeasureGUI_AngleDlg( getGeometryGUI(), parent );
break; // ANGLE
- case GEOMOp::OpAnnotation: {
- dlg = new MeasureGUI_AnnotationDlg( getGeometryGUI(), true, parent );
- } // ANNOTATION
- break;
- case GEOMOp::OpEditAnnotation: {
+ case GEOMOp::OpAnnotation:
+ dlg = new MeasureGUI_AnnotationDlg( getGeometryGUI(), true, parent );
+ break; // ANNOTATION
+ case GEOMOp::OpEditAnnotation:
dlg = new MeasureGUI_AnnotationDlg( getGeometryGUI(), false, parent );
- } // ANNOTATION
- break;
+ break; // ANNOTATION
case GEOMOp::OpTolerance:
dlg = new MeasureGUI_MaxToleranceDlg( getGeometryGUI(), parent );
break; // MAXTOLERANCE