#include "EntityGUI_Widgets.h"
#include <SalomeApp_DoubleSpinBox.h>
+#include <OCCViewer_ViewPort3d.h>
+#include <OCCViewer_ViewWindow.h>
+
#include <GEOMBase.h>
#include <GeometryGUI.h>
#include <GEOMImpl_Types.hxx>
{
MESSAGE("EntityGUI_SketcherDlg::OnPointSelected")
+ SUIT_ViewWindow* theViewWindow = getDesktop()->activeWindow();
+ OCCViewer_ViewPort3d* vp = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
+ QString theImgFileName = vp->backgroundImageFilename();
+
double x, y;
x = y = 0;
gp_Pnt aTrsfPnt;
GEOMBase::VertexToPoint( aShape, aTrsfPnt );
- autoApply = ( getPnt2ConstructorId() == 1 && false ); // If no additional argument needed after selection
- // -> apply automatically --> disabled for now
+ autoApply = ( (getPnt2ConstructorId() == 1) && (!theImgFileName.isEmpty()) ); // If no additional argument needed after selection and there is a backgroundimage
+ // -> apply automatically
if ( getPnt1ConstructorId() == 0 ){ // Relative selection mode
x = aTrsfPnt.X() - myLastX1;