Salome HOME
Merge V8_4_BR branch.
[modules/gui.git] / src / SalomeApp / SalomeApp_DoubleSpinBox.cxx
index d3101ee290d635cf7d89b916b8be5d588009070b..9bdda7525743fd458d2b7a8d1ffc8637f7723a7f 100644 (file)
@@ -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
 // File:      SalomeApp_DoubleSpinBox.cxx
 // Author:    Oleg UVAROV
 //
-#include <PyConsole_Interp.h> // this include must be first (see PyInterp_base.h)!
-#include <PyConsole_Console.h>
+
+#ifndef DISABLE_PYCONSOLE
+  #include <PyConsole_Interp.h> // 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;
 }
 
 /*!