X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSalomeApp%2FSalomeApp_DoubleSpinBox.cxx;h=9bdda7525743fd458d2b7a8d1ffc8637f7723a7f;hb=1c6902702083f5f05f7cad582c59445c089b9086;hp=d3101ee290d635cf7d89b916b8be5d588009070b;hpb=80f32aba5aa2bf61f6278621910d3e81a443d2e8;p=modules%2Fgui.git diff --git a/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx b/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx index d3101ee29..9bdda7525 100644 --- a/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx +++ b/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,8 +20,10 @@ // File: SalomeApp_DoubleSpinBox.cxx // Author: Oleg UVAROV // -#include // this include must be first (see PyInterp_base.h)! -#include + +#ifndef DISABLE_PYCONSOLE + #include // this include must be first (see PyInterp_base.h)! +#endif #include "SalomeApp_DoubleSpinBox.h" #include "SalomeApp_Application.h" @@ -434,8 +436,8 @@ SalomeApp_DoubleSpinBox::SearchState SalomeApp_DoubleSpinBox::findVariable( cons { if( studyDS->IsString( aName ) ) { - PyConsole_Console* pyConsole = app->pythonConsole(); - PyConsole_Interp* pyInterp = pyConsole->getInterp(); +#ifndef DISABLE_PYCONSOLE + PyConsole_Interp* pyInterp = app->getPyInterp(); PyLockWrapper aLock; // Acquire GIL std::string command; command = "import salome_notebook ; "; @@ -448,6 +450,7 @@ SalomeApp_DoubleSpinBox::SearchState SalomeApp_DoubleSpinBox::findVariable( cons { return IncorrectType; } +#endif } value = studyDS->GetReal( aName ); return Found; @@ -503,7 +506,7 @@ bool SalomeApp_DoubleSpinBox::isAcceptNames() const */ void SalomeApp_DoubleSpinBox::setShowTipOnValidate( const bool flag ) { - myShowTip = myShowTip; + myShowTip = flag; } /*!