From: rkv Date: Wed, 4 Dec 2013 11:26:36 +0000 (+0000) Subject: Fix for the bug #162: Edit imported bathymetry problem. X-Git-Tag: BR_hydro_v_0_4~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cb6b60ff2b1d903d34273078fe5e71e5c88c702b;p=modules%2Fhydro.git Fix for the bug #162: Edit imported bathymetry problem. --- diff --git a/src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx b/src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx index 8fb9c815..b32945ab 100644 --- a/src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx @@ -176,7 +176,7 @@ bool HYDROGUI_ImportBathymetryOp::processApply( int& theUpdateFlags, module()->setObjectVisible( (size_t)aVTKMgr->getViewModel(), aBathymetryObj, true ); } - theUpdateFlags = UF_Model | UF_VTKViewer | UF_VTK_Forced; + theUpdateFlags = UF_Model | UF_FitAll | UF_VTKViewer | UF_VTK_Init | UF_VTK_Forced; return true; } @@ -190,7 +190,14 @@ void HYDROGUI_ImportBathymetryOp::onFileSelected() QString anObjectName = aPanel->getObjectName().simplified(); if ( anObjectName.isEmpty() ) { - anObjectName = HYDROGUI_Tool::GenerateObjectName( module(), tr( "DEFAULT_BATHYMETRY_NAME" ) ); + anObjectName = aPanel->getFileName(); + if ( !anObjectName.isEmpty() ) { + anObjectName = QFileInfo( anObjectName ).baseName(); + } + + if ( anObjectName.isEmpty() ) { + anObjectName = HYDROGUI_Tool::GenerateObjectName( module(), tr( "DEFAULT_BATHYMETRY_NAME" ) ); + } aPanel->setObjectName( anObjectName ); } }