X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGUI_PY%2Fdockwidgets.py;h=54692ac880476a098ab53c5219d9b38b76232854;hb=b6e35aa42d3c67a529d7f9339718dfaed6891323;hp=2d370e905e73e70ef95c60dda72842f0335baf9e;hpb=963d72a615df404c5522b31212a908532dc87eff;p=modules%2Fgui.git diff --git a/src/GUI_PY/dockwidgets.py b/src/GUI_PY/dockwidgets.py index 2d370e905..54692ac88 100644 --- a/src/GUI_PY/dockwidgets.py +++ b/src/GUI_PY/dockwidgets.py @@ -1,3 +1,22 @@ +# Copyright (C) 2014-2024 CEA, EDF, 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, 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 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + from qtsalome import * import SalomePyQt @@ -24,7 +43,7 @@ def findDockWidgetByTitle( title ): """ sg = SalomePyQt.SalomePyQt() dwl = sg.getDesktop().findChildren( QDockWidget ) - dw = filter(lambda a: a.windowTitle() == str( title ), dwl) + dw = [a for a in dwl if a.windowTitle() == str( title )] if dw: return dw[0] return None