return isCompatible;
}
+
+bool SMESHGUI::reusableOperation( const int id )
+{
+ // compute, evaluate and precompute are not reusable operations
+ return ( id == 701 || id == 711 || id == 712 ) ? false : SalomeApp_Module::reusableOperation( id );
+}
+
bool SMESHGUI::activateModule( SUIT_Study* study )
{
bool res = SalomeApp_Module::activateModule( study );
virtual bool isSelectionCompatible();
+ virtual bool reusableOperation( const int id );
+
private:
void OnEditDelete();
int addVtkFontPref( const QString& label,
myHelpFileName = "about_meshes_page.html"; // V4
}
+SMESH::SMESH_Mesh_ptr SMESHGUI_BaseComputeOp::getMesh()
+{
+ LightApp_SelectionMgr* Sel = selectionMgr();
+ SALOME_ListIO selected; Sel->selectedObjects( selected );
+ Handle(SALOME_InteractiveObject) anIO = selected.First();
+ SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(anIO);
+ return myMesh->_is_nil() ? aMesh._retn() : SMESH::SMESH_Mesh::_duplicate( myMesh );
+}
+
//================================================================================
/*!
* \brief Start operation
computeMesh();
}
+//================================================================================
+/*!
+ * \brief check the same operations on the same mesh
+ */
+//================================================================================
+
+bool SMESHGUI_BaseComputeOp::isValid( SUIT_Operation* theOp ) const
+{
+ SMESHGUI_BaseComputeOp* baseOp = dynamic_cast<SMESHGUI_BaseComputeOp*>( theOp );
+ bool ret = true;
+ if ( !myMesh->_is_nil() && baseOp ) {
+ SMESH::SMESH_Mesh_var aMesh = baseOp->getMesh();
+ if ( !aMesh->_is_nil() && aMesh->GetId() == myMesh->GetId() ) ret = false;
+ }
+ return ret;
+}
+
//================================================================================
/*!
* \brief Gets dialog of this operation
SMESHGUI_BaseComputeOp();
virtual ~SMESHGUI_BaseComputeOp();
+ SMESH::SMESH_Mesh_ptr getMesh();
+
protected:
virtual void startOperation();
virtual void stopOperation();
SMESH::compute_error_array_var&,
const bool,
const QString&);
+
+ virtual bool isValid( SUIT_Operation* theOp ) const;
protected slots:
virtual bool onApply();