X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Swig.cxx;h=c1912cab2ad4e4c9c0a5c93c4f57cb85c63c1b40;hb=82decf21b02b9ab50c26308cd477078a92aeab3f;hp=1304bb5d26431fa838bc01430cd0245341d8dcdf;hpb=57b43b4d010e2d0a1529d3c131bbb9d416e63258;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_Swig.cxx b/src/SMESHGUI/SMESHGUI_Swig.cxx index 1304bb5d2..c1912cab2 100644 --- a/src/SMESHGUI/SMESHGUI_Swig.cxx +++ b/src/SMESHGUI/SMESHGUI_Swig.cxx @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -34,10 +34,13 @@ #include "SMESHGUI.h" #include "SMESHGUI_Utils.h" #include "SMESHGUI_GEOMGenUtils.h" +#include "SMESHGUI_Displayer.h" // SALOME Includes #include "SUIT_ResourceMgr.h" #include "SUIT_Session.h" +#include "SUIT_ViewModel.h" +#include "VTKViewer_ViewModel.h" #include "SALOME_Event.hxx" #include "SALOME_NamingService.hxx" @@ -49,6 +52,9 @@ // Open CASCADE Includes #include +// QT Includes +#include + // IDL Headers #include #include CORBA_SERVER_HEADER(SMESH_Gen) @@ -376,6 +382,8 @@ SMESH_Swig::Init(int theStudyID) } mySComponentMesh = SALOMEDS::SComponent::_narrow(aSComponent); + + qApp->processEvents(); // Workaround for bug 12662 } }; @@ -579,6 +587,27 @@ SMESH_Swig::AddSubMeshOnShape(const char* theMeshEntry, void SMESH_Swig::CreateAndDisplayActor( const char* Mesh_Entry ) { // SMESH_Actor* Mesh = smeshGUI->ReadScript(aM); + class TEvent: public SALOME_Event + { + private: + const char* _entry; + public: + TEvent(const char* Mesh_Entry) { + _entry = Mesh_Entry; + } + virtual void Execute() { + //SMESH::UpdateView(SMESH::eDisplay, _entry); + SUIT_Session* aSession = SUIT_Session::session(); + SUIT_Application* anApplication = aSession->activeApplication(); + SalomeApp_Application* anApp = dynamic_cast(anApplication); + SUIT_ViewManager* vman = anApp->getViewManager(VTKViewer_Viewer::Type(),true); + SMESHGUI_Displayer* aDisp = new SMESHGUI_Displayer(anApp); + aDisp->Display(_entry,1); + } + }; + + ProcessVoidEvent(new TEvent(Mesh_Entry)); + } void