From: adv Date: Mon, 9 Sep 2013 10:24:48 +0000 (+0000) Subject: Store imported file name for image object. X-Git-Tag: BR_hydro_v_0_1~54 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c0c1c32d5b02cf382e2567a12760cb541573cadb;p=modules%2Fhydro.git Store imported file name for image object. --- diff --git a/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx b/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx index d8da7204..158af2da 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx @@ -298,6 +298,11 @@ QString HYDROGUI_ImportImageDlg::getImageName() const return myImageName->text(); } +QString HYDROGUI_ImportImageDlg::getFileName() const +{ + return myFileName->text(); +} + void HYDROGUI_ImportImageDlg::setImageSize( const QSize& theSize, const bool theIsRefImage ) { diff --git a/src/HYDROGUI/HYDROGUI_ImportImageDlg.h b/src/HYDROGUI/HYDROGUI_ImportImageDlg.h index 18e8b54c..284f2999 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageDlg.h +++ b/src/HYDROGUI/HYDROGUI_ImportImageDlg.h @@ -61,6 +61,8 @@ public: void setImageName( const QString& theName ); QString getImageName() const; + QString getFileName() const; + void setImageSize( const QSize& theSize, const bool theIsRefImage = false ); diff --git a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx index 52ea65d9..30ce1388 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx @@ -300,6 +300,13 @@ bool HYDROGUI_ImportImageOp::processApply( int& theUpdateFlags, anImageObj->SetTrsfPoints( aPointA1, aPointB1, aPointC1, aPointA2, aPointB2, aPointC2 ); + if( !myIsEdit ) + { + // Set imported file name for image + QString aFilePath = aPanel->getFileName(); + anImageObj->SetFilePath( aFilePath ); + } + // must be done after all checks and before calling SetVisible() method below closePreview();