]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Store imported file name for image object.
authoradv <adv@opencascade.com>
Mon, 9 Sep 2013 10:24:48 +0000 (10:24 +0000)
committeradv <adv@opencascade.com>
Mon, 9 Sep 2013 10:24:48 +0000 (10:24 +0000)
src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx
src/HYDROGUI/HYDROGUI_ImportImageDlg.h
src/HYDROGUI/HYDROGUI_ImportImageOp.cxx

index d8da72045970f14d399a9d08b5e169b717b773af..158af2da7794c495e3e5d9b5eff20c543263e3c4 100644 (file)
@@ -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 )
 {
index 18e8b54c66b0f7d44808754e352ea606b9c20ad6..284f2999cd649338745e31d370ac500c2df1aae9 100644 (file)
@@ -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 );
 
index 52ea65d9c32263bb5033fef06b230f79b6709471..30ce138871e709defa5e5c9b735e0620d5740f9b 100644 (file)
@@ -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();