]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
IPAL20025 4.x: wrong presentation is created with checked "Logarithmic Scaling" option.
authordmv <dmv@opencascade.com>
Thu, 26 Jun 2008 05:43:42 +0000 (05:43 +0000)
committerdmv <dmv@opencascade.com>
Thu, 26 Jun 2008 05:43:42 +0000 (05:43 +0000)
Bug IPAL20023 4.x: to change title of the "TITLE" dlg and implement action for "Help" button.

src/VISUGUI/VisuGUI_Table3dDlg.cxx

index 6814347acbfb108671fd9aac4e37f3a1ea95f3ac..2b49f5c93cac789bf1418b0c67ca78ca38d79b23 100644 (file)
@@ -402,13 +402,17 @@ void VisuGUI_TableScalarBarPane::initFromPrsObject(VISU::PointMap3d_i* thePrs)
   if( !myBarPrs )
     return;
 
-  switch(myBarPrs->GetScaling()){
-  case VISU::LOGARITHMIC :
-    CBLog->setChecked( true );
-    break;
-  default:
-    CBLog->setChecked( false );
+  if (myBarPrs->IsPositiveTable()) {
+    switch(myBarPrs->GetScaling()){
+    case VISU::LOGARITHMIC :
+      CBLog->setChecked( true );
+      break;
+    default:
+      CBLog->setChecked( false );
+    }
   }
+  else
+    CBLog->setEnabled(false);
 
   setRange( myBarPrs->GetMin(), myBarPrs->GetMax(), myBarPrs->IsRangeFixed() );
 
@@ -652,7 +656,7 @@ void VisuGUI_TableScalarBarPane::changeDefaults( int )
 VisuGUI_Table3DDlg::VisuGUI_Table3DDlg ( SalomeApp_Module* theModule )
   : QDialog ( VISU::GetDesktop(theModule), 0, false )
 {
-  setCaption(tr("TITLE"));
+  setCaption(tr("Point Map 3D Definition"));
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* TopLayout = new QVBoxLayout(this);
@@ -743,7 +747,25 @@ void VisuGUI_Table3DDlg::onApply()
 //=======================================================================
 void VisuGUI_Table3DDlg::onHelp()
 {
-  // "table_3d_page.html";
+  QString aHelpFileName = "table_3d_page.html";
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>( app->activeModule() );
+    app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
+  }
+  else {
+    QString platform;
+#ifdef WIN32
+    platform = "winapplication";
+#else
+    platform = "application";
+#endif
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+                           QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                           arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                           QObject::tr("BUT_OK"));
+  }
+
 }
 
 //=======================================================================