From 35a7015814943760ee31751791b4169d494fa057 Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 26 Jun 2008 05:43:42 +0000 Subject: [PATCH] IPAL20025 4.x: wrong presentation is created with checked "Logarithmic Scaling" option. Bug IPAL20023 4.x: to change title of the "TITLE" dlg and implement action for "Help" button. --- src/VISUGUI/VisuGUI_Table3dDlg.cxx | 38 +++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/src/VISUGUI/VisuGUI_Table3dDlg.cxx b/src/VISUGUI/VisuGUI_Table3dDlg.cxx index 6814347a..2b49f5c9 100644 --- a/src/VISUGUI/VisuGUI_Table3dDlg.cxx +++ b/src/VISUGUI/VisuGUI_Table3dDlg.cxx @@ -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( 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")); + } + } //======================================================================= -- 2.39.2