]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Fix for bug #395: more user friendly tooltip for the check box.
authormzn <mzn@opencascade.com>
Fri, 4 Apr 2014 06:11:04 +0000 (06:11 +0000)
committermzn <mzn@opencascade.com>
Fri, 4 Apr 2014 06:11:04 +0000 (06:11 +0000)
src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx

index 4a50f528704754ec6734dc66984500593146aeb5..e44c189cd287a888cdf9dd6cbfe8bedd997b7c19 100644 (file)
@@ -54,7 +54,6 @@ HYDROGUI_ZLevelsDlg::HYDROGUI_ZLevelsDlg( QWidget* theParent, HYDROGUI_Module* t
 
   // "All objects" check box
   myAllObjects = new QCheckBox( tr( "ALL_OBJECTS" ) );
-  myAllObjects->setToolTip( tr( "ALL_OBJECTS_TLT" ) );
 
   // Apply and close buttons
   myApply = new QPushButton( tr("APPLY") );
@@ -120,5 +119,10 @@ QList<Handle(HYDROData_Entity)> HYDROGUI_ZLevelsDlg::getObjects() const
 void HYDROGUI_ZLevelsDlg::onStateChanged()
 {
   bool isAll = myAllObjects->isChecked();
+
+  QString aToolTip = isAll ? tr( "ALL_OBJECTS_CHECKED_TLT" ) :
+                             tr( "ALL_OBJECTS_UNCHECKED_TLT" );
+  myAllObjects->setToolTip( aToolTip );
+
   myListWidget->setHiddenObjectsShown( isAll );
 }