Fix for Bug IPAL9053( 3.0.0: "Check Geometry" and "Load script" functionalities from menu "Tools" aren't work.).

"Load Script" moved from Geometry module to menu File(so, now it is accessible from all modules).
This commit is contained in:
mzn 2005-06-09 09:10:51 +00:00
parent 9d1fc14305
commit 46b338c045
7 changed files with 8 additions and 62 deletions

View File

@ -174,7 +174,6 @@
<menu-item label-id="Tools" item-id="5" pos-id=""> <menu-item label-id="Tools" item-id="5" pos-id="">
<separator pos-id=""/> <separator pos-id=""/>
<popup-item item-id="5103" pos-id="" label-id="Check Geometry" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/> <popup-item item-id="5103" pos-id="" label-id="Check Geometry" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5104" pos-id="" label-id="Load Script" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item> </menu-item>
<!-- ********************************* Settings (menubar) ********************************* --> <!-- ********************************* Settings (menubar) ********************************* -->

View File

@ -154,7 +154,6 @@
<menu-item label-id="Outils" item-id="5" pos-id=""> <menu-item label-id="Outils" item-id="5" pos-id="">
<separator pos-id=""/> <separator pos-id=""/>
<popup-item item-id="5103" pos-id="" label-id="Check Géométrie" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/> <popup-item item-id="5103" pos-id="" label-id="Check Géométrie" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5104" pos-id="" label-id="Charger Script" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item> </menu-item>
<!-- ********************************* Settings (menubar) ********************************* --> <!-- ********************************* Settings (menubar) ********************************* -->

View File

@ -150,10 +150,6 @@ msgstr "Export"
msgid "GEOM_MEN_IMPORT" msgid "GEOM_MEN_IMPORT"
msgstr "Import" msgstr "Import"
#: GeometryGUI.cxx:3763
msgid "GEOM_MEN_LOAD_SCRIPT"
msgstr "PYTHON Files ( *.py )"
#: GeometryGUI.cxx:2931 #: GeometryGUI.cxx:2931
msgid "GEOM_MEN_ISOS" msgid "GEOM_MEN_ISOS"
msgstr "Select Number Of Isos" msgstr "Select Number Of Isos"
@ -2700,15 +2696,6 @@ msgstr "Check Geometry"
msgid "STB_CHECK_GEOMETRY" msgid "STB_CHECK_GEOMETRY"
msgstr "Check Geometry" msgstr "Check Geometry"
msgid "TOP_LOAD_SCRIPT"
msgstr "Load script"
msgid "MEN_LOAD_SCRIPT"
msgstr "Load script"
msgid "STB_LOAD_SCRIPT"
msgstr "Load script"
msgid "MEN_PREFERENCES" msgid "MEN_PREFERENCES"
msgstr "Preferences" msgstr "Preferences"

View File

@ -303,7 +303,6 @@ void GeometryGUI::OnGUIEvent( int id )
id == 413 || // MENU SETTINGS - ISOS id == 413 || // MENU SETTINGS - ISOS
id == 414 || // MENU SETTINGS - STEP VALUE FOR SPIN BOXES id == 414 || // MENU SETTINGS - STEP VALUE FOR SPIN BOXES
id == 5103 || // MENU TOOLS - CHECK GEOMETRY id == 5103 || // MENU TOOLS - CHECK GEOMETRY
id == 5104 || // MENU TOOLS - LOAD SCRIPT
id == 8032 || // POPUP VIEWER - COLOR id == 8032 || // POPUP VIEWER - COLOR
id == 8033 || // POPUP VIEWER - TRANSPARENCY id == 8033 || // POPUP VIEWER - TRANSPARENCY
id == 8034 || // POPUP VIEWER - ISOS id == 8034 || // POPUP VIEWER - ISOS
@ -707,8 +706,7 @@ void GeometryGUI::initialize( CAM_Application* app )
createGeomAction( 7072, "CHECK_COMPOUND" ); createGeomAction( 7072, "CHECK_COMPOUND" );
createGeomAction( 5103, "CHECK_GEOMETRY" ); createGeomAction( 5103, "CHECK_GEOMETRY" );
createGeomAction( 5104, "LOAD_SCRIPT" );
createGeomAction( 412, "SHADING_COLOR" ); createGeomAction( 412, "SHADING_COLOR" );
createGeomAction( 413, "ISOS" ); createGeomAction( 413, "ISOS" );
createGeomAction( 414, "STEP_VALUE" ); createGeomAction( 414, "STEP_VALUE" );
@ -859,8 +857,7 @@ void GeometryGUI::initialize( CAM_Application* app )
int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 10 ); int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 10 );
createMenu( separator(), toolsId, -1 ); createMenu( separator(), toolsId, -1 );
createMenu( 5103, toolsId, -1 ); createMenu( 5103, toolsId, -1 );
createMenu( 5104, toolsId, -1 );
int prefId = createMenu( tr( "MEN_PREFERENCES" ), -1, -1, 10 ); int prefId = createMenu( tr( "MEN_PREFERENCES" ), -1, -1, 10 );
createMenu( separator(), prefId, -1 ); createMenu( separator(), prefId, -1 );

View File

@ -189,11 +189,6 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
OnCheckGeometry(); OnCheckGeometry();
break; break;
} }
case 5104: // LOAD SCRIPT
{
OnLoadScript();
break;
}
case 8032: // COLOR - POPUP VIEWER case 8032: // COLOR - POPUP VIEWER
{ {
OnColor(); OnColor();

View File

@ -61,7 +61,6 @@ private:
void OnSettingsStep(); void OnSettingsStep();
void OnRename(); void OnRename();
void OnCheckGeometry(); void OnCheckGeometry();
void OnLoadScript();
// Popup commands // Popup commands
void OnColor(); void OnColor();

View File

@ -26,6 +26,8 @@
// Module : GEOM // Module : GEOM
// $Header$ // $Header$
#include <PythonConsole_PyConsole.h>
#include "GEOMToolsGUI.h" #include "GEOMToolsGUI.h"
#include "GeometryGUI.h" #include "GeometryGUI.h"
#include "GEOM_Actor.h" #include "GEOM_Actor.h"
@ -206,43 +208,11 @@ void GEOMToolsGUI::OnRename()
void GEOMToolsGUI::OnCheckGeometry() void GEOMToolsGUI::OnCheckGeometry()
{ {
/* SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
QAD_PyEditor* PyEditor = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getPyEditor(); PythonConsole* pyConsole = app->pythonConsole();
PyEditor->setText("from GEOM_usinggeom import *\n");
PyEditor->handleReturn();
*/
}
void GEOMToolsGUI::OnLoadScript()
{
/*
_PTR(Study) aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
bool aLocked = (_PTR(AttributeStudyProperties)(aStudy->GetProperties())->IsLocked();
if ( aLocked ) {
QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(),
QObject::tr("WRN_WARNING"),
QObject::tr("WRN_STUDY_LOCKED"),
QObject::tr("BUT_OK") );
return;
}
QStringList filtersList; if(pyConsole)
filtersList.append(tr("GEOM_MEN_LOAD_SCRIPT")); pyConsole->exec("from GEOM_usinggeom import *");
filtersList.append(tr("GEOM_MEN_ALL_FILES"));
QString aFile = QAD_FileDlg::getFileName(QAD_Application::getDesktop(), "", filtersList, tr("GEOM_MEN_IMPORT"), true);
if(!aFile.isEmpty()) {
QFileInfo file = aFile;
QApplication::setOverrideCursor(Qt::waitCursor);
QAD_PyEditor* PyEditor = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getPyEditor();
QStringList aTextList = QStringList::split(".", file.fileName());
PyEditor->setText("import geompy; geompy.addPath('" + file.dirPath() + "'); from " + aTextList.first() + " import *\n" );
PyEditor->handleReturn();
}
QApplication::restoreOverrideCursor();
*/
} }
void GEOMToolsGUI::OnColor() void GEOMToolsGUI::OnColor()