Salome HOME
Change backgroundImageFile() to background() due to the introduction of gradiant...
authorgdd <gdd>
Wed, 15 Feb 2012 13:23:34 +0000 (13:23 +0000)
committergdd <gdd>
Wed, 15 Feb 2012 13:23:34 +0000 (13:23 +0000)
src/EntityGUI/EntityGUI_SketcherDlg.cxx

index e3ec23f224823ad4dc1eac56f1284259edb9cdc7..b39843b472a380328f4e7e2f891e8d01b0930c4b 100644 (file)
@@ -1528,9 +1528,9 @@ void EntityGUI_SketcherDlg::OnPointSelected(Qt::KeyboardModifiers modifiers, con
 {
   MESSAGE("EntityGUI_SketcherDlg::OnPointSelected")
   
-  SUIT_ViewWindow*       theViewWindow  = getDesktop()->activeWindow();
-  OCCViewer_ViewPort3d*  vp             = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
-  QString                theImgFileName = vp->backgroundImageFilename();
+  SUIT_ViewWindow*      theViewWindow  = getDesktop()->activeWindow();
+  OCCViewer_ViewPort3d* vp             = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
+  Qtx::BackgroundData   bg             = vp->background();
   
   double x, y;
   x = y = 0;
@@ -1549,7 +1549,7 @@ void EntityGUI_SketcherDlg::OnPointSelected(Qt::KeyboardModifiers modifiers, con
   gp_Pnt aTrsfPnt; 
   GEOMBase::VertexToPoint( aShape, aTrsfPnt );
   
-  autoApply = ( (getPnt2ConstructorId() == 1) && (!theImgFileName.isEmpty()) );  // If no additional argument needed after selection and there is a backgroundimage
+  autoApply = ( (getPnt2ConstructorId() == 1) && (!bg.isValid()) );  // If no additional argument needed after selection and there is a backgroundimage
                                                                                  // -> apply automatically 
   
   if ( getPnt1ConstructorId() == 0 ){                    // Relative selection mode