Salome HOME
Clear info panel when module is deactivated
[modules/gui.git] / src / Qtx / QtxInfoPanel.cxx
index 5920d6fea967187503c4cb25c10c833c9ce9fef6..f2a36af99de0d87ee3ff9d20335ec8e8020d2952 100644 (file)
@@ -96,10 +96,30 @@ void QtxInfoPanel::Container::addLabel( const QString& text, Qt::Alignment align
 
 void QtxInfoPanel::Container::addAction( QAction* action, const int id )
 {
+  static const char* empty_xpm[] = {"16 16 1 1",
+                                    "  c None",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                ",
+                                    "                "};
   QToolButton* button = new QToolButton( this );
   button->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
   button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
   button->setAutoRaise( true );
+  if ( action->icon().isNull() )
+    action->setIcon( QPixmap(empty_xpm) );
   button->setDefaultAction( action );
   put( button );
   ids[ id ] = button;