From: DUC ANH HOANG Date: Thu, 20 Jun 2024 11:17:24 +0000 (+0200) Subject: clean1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7a5a949f44f81f3ed6a314cd9ab6730a07f27e84;p=modules%2Fgui.git clean1 --- diff --git a/src/SPV3D/SPV3D_CADSelection.cxx b/src/SPV3D/SPV3D_CADSelection.cxx index 5849227de..3567848c6 100644 --- a/src/SPV3D/SPV3D_CADSelection.cxx +++ b/src/SPV3D/SPV3D_CADSelection.cxx @@ -40,6 +40,9 @@ #include +#include "SPV3D_Prs.h" + + //----------------------------------------------------------------------------- SPV3D_CADSelection::SPV3D_CADSelection(QObject *parent, @@ -289,22 +292,21 @@ void SPV3D_CADSelection::onMouseMove() // Retrieve the wanted information property - vtkSMProperty* selectedIDProperty = + vtkSMProperty* PreselectedIDProperty = proxyRepresentation->GetProperty("PreSelectedID"); - if (!selectedIDProperty) + if (!PreselectedIDProperty) { qWarning()<< "The representation named '" << proxyRepresentation->GetXMLName()<< "' didn't have a property named 'SelectedIDInfo'."; return; } // Force to update the information property - proxyRepresentation->UpdatePropertyInformation(selectedIDProperty); + proxyRepresentation->UpdatePropertyInformation(PreselectedIDProperty); - //vtkIdType PreSelectedID = - // vtkSMPropertyHelper(proxyRepresentation,"PreSelectedID").GetAsInt(0); + vtkIdType PreSelectedID = + vtkSMPropertyHelper(proxyRepresentation,"PreSelectedID").GetAsInt(0); + std::cout << "entry from client: "<< SPV3D_Prs::FromVtkIdToEntry(PreSelectedID)<< std::endl; - //std::cout << "PreSelectedID: "<< PreSelectedID<< std::endl; - // } //----------------------------------------------------------------------------- diff --git a/src/SPV3D/SPV3D_ViewModel.cxx b/src/SPV3D/SPV3D_ViewModel.cxx index d00ea859a..8471c2663 100644 --- a/src/SPV3D/SPV3D_ViewModel.cxx +++ b/src/SPV3D/SPV3D_ViewModel.cxx @@ -235,35 +235,6 @@ void SPV3D_ViewModel::Display( const SALOME_PV3DPrs* prs ) { std::cout<< "Can't update PV presentation pipeline"<< std::endl; } - /* - - if(const SPV3D_Prs* aPrs = dynamic_cast( prs )) - { - if( !aPrs->GetRepresentation() ) - { - pqObjectBuilder *builder(pqApplicationCore::instance()->getObjectBuilder()); - pqActiveObjects::instance().setActiveView(getView()); - pqPipelineSource *mySourceProducer = aPrs->GetSourceProducer(); - aPrs->SetSourceProducer( mySourceProducer ); - pqDataRepresentation* myRepr(builder->createDataRepresentation(mySourceProducer->getOutputPort(0),getView(),"CADRepresentation"));//"GeometryRepresentation" - vtkSMViewProxy::RepresentationVisibilityChanged(myRepr->getViewProxy(), myRepr->getProxy(), true); - - aPrs->SetRepresentation(myRepr); - } - pqDataRepresentation* myRepr = aPrs->GetRepresentation(); - - myRepr->setVisible(1); - vtkSMPVRepresentationProxy* proxy(dynamic_cast(myRepr->getProxy())); - if(proxy) - { - vtkSMPropertyHelper inputHelper(proxy, "Input"); - vtkSMSourceProxy* input = vtkSMSourceProxy::SafeDownCast(inputHelper.GetAsProxy()); - input->UpdatePipeline(); - } - getView()->resetDisplay(); - getView()->render(); - } - */ } /*! @@ -279,14 +250,8 @@ void SPV3D_ViewModel::Erase( const SALOME_PV3DPrs* prs, const bool /*forced*/ ) return; aPrs->hide(); updatePVPrsPipeline(aPrs); - ////aPrs->GetRepresentation()->setVisible(0); - ////aPrs->GetRepresentation()->setVisible(1); - //// getView()->resetDisplay(); getView()->render(); - //pqObjectBuilder* builder = pqApplicationCore::instance()->getObjectBuilder(); - //pqServer* activeServer = pqActiveObjects::instance().activeServer(); - //builder->destroySources(activeServer); } }