From cb6b60ff2b1d903d34273078fe5e71e5c88c702b Mon Sep 17 00:00:00 2001 From: rkv Date: Wed, 4 Dec 2013 11:26:36 +0000 Subject: [PATCH] Fix for the bug #162: Edit imported bathymetry problem. --- src/HYDROGUI/HYDROGUI_ImportBathymetryOp.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 ); } } -- 2.39.2