X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ImportSinusXOp.cxx;h=38b5cf4cb14ebf1389c2fa81d81e76b30d58512f;hb=dfa894b758ac65080dc7185d25b7646dc45a10f4;hp=621193da245d77efb6c273047237fc4364558440;hpb=9c8d698c3b5d49b84083b87d766d3185ea394115;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ImportSinusXOp.cxx b/src/HYDROGUI/HYDROGUI_ImportSinusXOp.cxx index 621193da..38b5cf4c 100644 --- a/src/HYDROGUI/HYDROGUI_ImportSinusXOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportSinusXOp.cxx @@ -1,8 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2014-2015 EDF-R&D // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -25,7 +21,7 @@ #include "HYDROGUI_DataModel.h" #include "HYDROGUI_Module.h" #include "HYDROGUI_UpdateFlags.h" -#include "HYDROGUI_Tool.h" +#include "HYDROGUI_Tool2.h" #include #include #include @@ -63,7 +59,7 @@ void HYDROGUI_ImportSinusXOp::startOperation() myFileDlg = new SUIT_FileDlg( module()->getApp()->desktop(), true ); myFileDlg->setWindowTitle( getName() ); myFileDlg->setFileMode( SUIT_FileDlg::ExistingFiles ); - myFileDlg->setFilter( tr("SINUSX_FILTER") ); + myFileDlg->setNameFilter( tr("SINUSX_FILTER") ); connect( myFileDlg, SIGNAL( accepted() ), this, SLOT( onApply() ) ); connect( myFileDlg, SIGNAL( rejected() ), this, SLOT( onCancel() ) ); @@ -95,7 +91,7 @@ void HYDROGUI_ImportSinusXOp::onApply() if (anExt == "sx") { HYDROData_SinusX aSinusXImporter; - NCollection_Sequence anEntities; + NCollection_Sequence anEntities; if (aSinusXImporter.Import(aFileName, doc(), anEntities)) { UpdateView(anEntities); @@ -112,16 +108,15 @@ void HYDROGUI_ImportSinusXOp::onApply() else abort(); - module()->update( UF_Model | UF_VTKViewer | UF_VTK_Forced | UF_VTK_Init ); - + module()->update( UF_Model | UF_VTKViewer | UF_OCCViewer ); QApplication::restoreOverrideCursor(); } -void HYDROGUI_ImportSinusXOp::UpdateView( NCollection_Sequence& anEntities) +void HYDROGUI_ImportSinusXOp::UpdateView( NCollection_Sequence& anEntities) { size_t anActiveViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() ); if ( anActiveViewId == 0 ) - anActiveViewId = HYDROGUI_Tool::GetActiveOCCViewId( module() ); + anActiveViewId = HYDROGUI_Tool::GetActiveViewId( module() ); for (int i = 1; i <= anEntities.Size() ; i++) {