Salome HOME
[bos #24677] : fix compilation bug due to KERNEL modification ef6e9ece004bd054
[modules/yacs.git] / src / genericgui / EditionPyFunc.cxx
index df69cf0c97ffb45a6f6b069c30356751f88927b0..6f6fa2ef21ecffefb9e4d5cd551ddbe05be714e4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -26,9 +26,8 @@
 
 #include <QToolButton>
 
-#if HAS_QSCI4>0
-#include <qsciscintilla.h>
-#include <qscilexerpython.h>
+#ifdef HAS_PYEDITOR
+#include <PyEditor_Editor.h>
 #endif
 
 #include <cassert>
@@ -75,6 +74,12 @@ EditionPyFunc::EditionPyFunc(Subject* subject,
   _glayout->addLayout( glt , 1);
 
   _glayout->addWidget( _sci );
+  if (!QtGuiContext::getQtCurrent()->isEdition())
+  {
+    gener_template->setEnabled (false);
+    _liFuncName->setEnabled (false);
+  }
+
 
   connect(_liFuncName, SIGNAL(textChanged(const QString&)),
           this, SLOT(onFuncNameModified(const QString&)));