Salome HOME
Fix for the bug #255: VTK viewer is not updated after modification of objects.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ColorWidget.cxx
index 68ad84a7c2dd297503fc8ea3925205c82daca10c..c6ad0db1816409a9bef27218ea1a4c257094c9ad 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "HYDROGUI_ColorWidget.h"
 
+#include <QApplication>
 #include <QColorDialog>
 
 HYDROGUI_ColorWidget::HYDROGUI_ColorWidget( QWidget* parent )
@@ -52,6 +53,13 @@ void HYDROGUI_ColorWidget::setColor( const QColor& c )
   setPalette( aPalette );
 }
 
+void HYDROGUI_ColorWidget::resetColor()
+{
+  QPalette aDefPalette = QApplication::palette();
+  QColor aColor = aDefPalette.color( QPalette::Window );
+  setColor( aColor );
+}
+
 void HYDROGUI_ColorWidget::mouseDoubleClickEvent( QMouseEvent* )
 {
   QColor c = QColorDialog::getColor( color(), this );