X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSalomeApp%2FSalomeApp_IntSpinBox.cxx;h=1c97310d9ac7f613ea8207eda3520088306fbac1;hb=d908d79b4d02a8ce0a3487e8b148248a284b09b9;hp=cf0bd0c93f48b6965c14d31c1cdb81b78afc9b53;hpb=6f830a4e8a33f930886044fb0e328f2aa86583c7;p=modules%2Fgui.git diff --git a/src/SalomeApp/SalomeApp_IntSpinBox.cxx b/src/SalomeApp/SalomeApp_IntSpinBox.cxx index cf0bd0c93..1c97310d9 100644 --- a/src/SalomeApp/SalomeApp_IntSpinBox.cxx +++ b/src/SalomeApp/SalomeApp_IntSpinBox.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 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_IntSpinBox.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_IntSpinBox.h" #include "SalomeApp_Application.h" @@ -382,8 +384,8 @@ SalomeApp_IntSpinBox::SearchState SalomeApp_IntSpinBox::findVariable( const QStr { 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 ; "; @@ -396,6 +398,7 @@ SalomeApp_IntSpinBox::SearchState SalomeApp_IntSpinBox::findVariable( const QStr { return IncorrectType; } +#endif } value = studyDS->GetInteger( aName ); return Found; @@ -451,7 +454,7 @@ bool SalomeApp_IntSpinBox::isAcceptNames() const */ void SalomeApp_IntSpinBox::setShowTipOnValidate( const bool flag ) { - myShowTip = myShowTip; + myShowTip = flag; } /*!