Salome HOME
Patch for MacOS (from SALOME forum)
[modules/geom.git] / src / GEOMGUI / GEOMGUI_CreationInfoWdg.cxx
index 5c3681e28df6f1fa778bac57d987225ebce38c1c..7ef3821af2f264bd6f97075a3c1daaa57c9626e0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  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
@@ -47,7 +47,11 @@ GEOMGUI_CreationInfoWdg::GEOMGUI_CreationInfoWdg( SalomeApp_Application* app )
   myParamsTreeWd->setColumnCount( 2 );
   myParamsTreeWd->setHeaderLabels( QStringList() << tr( "PARAMETER" ) << tr( "VALUE" ) );
   myParamsTreeWd->header()->setStretchLastSection( true );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   myParamsTreeWd->header()->setResizeMode( 0, QHeaderView::ResizeToContents );
+#else
+  myParamsTreeWd->header()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
+#endif
 
   QVBoxLayout* aLayout = new QVBoxLayout( this );
   aLayout->addWidget( myParamsTreeWd );
@@ -124,7 +128,10 @@ void GEOMGUI_CreationInfoWdg::setInfo( GEOM::CreationInformationSeq& info )
           }
           // get icon
           QString prefix = plugin_name.isEmpty() ? "GEOM" : plugin_name;
-          icon = resMgr->loadPixmap( prefix, tr( ("ICO_"+name).toLatin1().constData() ), false );
+          if ( name.startsWith( "Import"))
+            icon = resMgr->loadPixmap( "GEOM", tr("ICO_IMPORT_SHAPE"), true );
+          else
+            icon = resMgr->loadPixmap( prefix, tr( ("ICO_"+name).toLatin1().constData() ), false );
 
           // translate operation name
           operationName = tr( ("MEN_"+name).toLatin1().constData() );