From 577ebb1ccd4c03217d5238dd588414ac47aaf0ea Mon Sep 17 00:00:00 2001 From: asv Date: Fri, 10 Jun 2005 12:43:15 +0000 Subject: [PATCH] Bug fixes. --- src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx | 9 +++++++++ src/BlocksGUI/BlocksGUI_ExplodeDlg.h | 2 ++ src/GEOMGUI/GEOM_msg_en.po | 12 ++++++------ src/GEOMGUI/GeometryGUI.cxx | 4 ++-- src/MeasureGUI/MeasureGUI_Skeleton.cxx | 3 ++- src/RepairGUI/RepairGUI_FreeFacesDlg.cxx | 7 +++++-- src/RepairGUI/RepairGUI_GlueDlg.cxx | 16 +++++++++------- 7 files changed, 35 insertions(+), 18 deletions(-) diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx index ac63e4135..9ebdd93ec 100644 --- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx @@ -494,3 +494,12 @@ GEOM::GEOM_Object_ptr BlocksGUI_ExplodeDlg::getFather (GEOM::GEOM_Object_ptr) { return myObject; } + +//================================================================ +// Function : getNewObjectName +// Purpose : Redefine this method to return proper name for a new object +//================================================================ +const char* BlocksGUI_ExplodeDlg::getNewObjectName() const +{ + return ""; +} diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.h b/src/BlocksGUI/BlocksGUI_ExplodeDlg.h index 53b55e8c3..7c83e73bf 100644 --- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.h +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.h @@ -54,6 +54,8 @@ protected: virtual bool execute (ObjectList& objects); virtual GEOM::GEOM_Object_ptr getFather(GEOM::GEOM_Object_ptr theObj); + virtual const char* getNewObjectName() const; + private: void Init(); void enterEvent (QEvent* e); diff --git a/src/GEOMGUI/GEOM_msg_en.po b/src/GEOMGUI/GEOM_msg_en.po index 19646195f..430772f20 100644 --- a/src/GEOMGUI/GEOM_msg_en.po +++ b/src/GEOMGUI/GEOM_msg_en.po @@ -2478,13 +2478,13 @@ msgid "STB_MUL_TRANSFORM" msgstr "Multi-transformation" msgid "TOP_EXPLODE_BLOCKS" -msgstr "Expload on Blocks" +msgstr "Explode on Blocks" msgid "MEN_EXPLODE_BLOCKS" -msgstr "Expload on Blocks" +msgstr "Explode on Blocks" msgid "STB_EXPLODE_BLOCKS" -msgstr "Expload on Blocks" +msgstr "Explode on Blocks" msgid "TOP_PROPAGATE" msgstr "Propagate" @@ -2592,13 +2592,13 @@ msgid "MEN_MEASURES" msgstr "Measures" msgid "TOP_POINT_COORDS" -msgstr "Point corrdinates" +msgstr "Point coordinates" msgid "MEN_POINT_COORDS" -msgstr "Point corrdinates" +msgstr "Point coordinates" msgid "STB_POINT_COORDS" -msgstr "Point corrdinates" +msgstr "Point coordinates" msgid "TOP_BASIC_PROPS" msgstr "Basic properties" diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 811f5b1ba..ec47ce98d 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -682,7 +682,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createGeomAction( 504, "ARCHIMEDE" ); createGeomAction( 505, "FILLET" ); createGeomAction( 506, "CHAMFER" ); - createGeomAction( 507, "CLIPPING" ); + //createGeomAction( 507, "CLIPPING" ); createGeomAction( 9998, "MUL_TRANSFORM" ); createGeomAction( 9995, "EXPLODE_BLOCKS" ); @@ -822,7 +822,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createMenu( separator(), operId, -1 ); createMenu( 505, transId, -1 ); createMenu( 506, transId, -1 ); - createMenu( 507, transId, -1 ); + //createMenu( 507, transId, -1 ); int blockId = createMenu( tr( "MEN_BLOCKS" ), operId, -1 ); createMenu( 9998, blockId, -1 ); diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.cxx b/src/MeasureGUI/MeasureGUI_Skeleton.cxx index 402285c3d..85eac7a0a 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.cxx +++ b/src/MeasureGUI/MeasureGUI_Skeleton.cxx @@ -35,6 +35,7 @@ #include "SalomeApp_SelectionMgr.h" #include "SalomeApp_Tools.h" #include "SUIT_Session.h" +#include "SUIT_OverrideCursor.h" #include #include @@ -287,7 +288,7 @@ void MeasureGUI_Skeleton::redisplayPreview() try { - QApplication::setOverrideCursor( Qt::waitCursor ); + SUIT_OverrideCursor(); getDisplayer()->SetColor( Quantity_NOC_VIOLET ); getDisplayer()->SetToActivate( false ); diff --git a/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx b/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx index 35831e001..fef1a3ac0 100644 --- a/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx @@ -32,7 +32,9 @@ using namespace std; #include "SalomeApp_Application.h" #include "SalomeApp_SelectionMgr.h" #include "SalomeApp_Tools.h" + #include "SUIT_Session.h" +#include "SUIT_OverrideCursor.h" #include "SALOME_ListIteratorOfListIO.hxx" @@ -278,11 +280,12 @@ bool RepairGUI_FreeFacesDlg::execute( ObjectList& objects ) erasePreview( true ); return false; } + + SUIT_OverrideCursor(); TopExp::MapShapes( aSelShape, anIndices); SALOME_Prs* aPrs = 0; - QApplication::setOverrideCursor( Qt::waitCursor ); - + for ( int i = 0, n = aFaceLst->length(); i < n; i++ ) { aFace = anIndices.FindKey( aFaceLst[i] ); diff --git a/src/RepairGUI/RepairGUI_GlueDlg.cxx b/src/RepairGUI/RepairGUI_GlueDlg.cxx index 52572ac82..218697875 100644 --- a/src/RepairGUI/RepairGUI_GlueDlg.cxx +++ b/src/RepairGUI/RepairGUI_GlueDlg.cxx @@ -36,8 +36,10 @@ using namespace std; #include "SalomeApp_SelectionMgr.h" #include "SalomeApp_Study.h" #include "SalomeApp_Tools.h" + #include "SUIT_Session.h" #include "SUIT_MessageBox.h" +#include "SUIT_OverrideCursor.h" #include "SALOME_ListIteratorOfListIO.hxx" @@ -375,14 +377,15 @@ bool RepairGUI_GlueDlg::onAcceptLocal( const bool publish, const bool useTransac try { if ( ( !publish && !useTransaction ) || openCommand() ) { - QApplication::setOverrideCursor( Qt::waitCursor ); + + SUIT_OverrideCursor wc; + SUIT_Session::session()->activeApplication()->putInfo( "" ); ObjectList objects; // JFA 28.12.2004 if ( !execute( objects ) || !getOperation()->IsDone() ) { if ( !execute( objects ) ) { // JFA 28.12.2004 // To enable warnings - while( QApplication::overrideCursor() ) - QApplication::restoreOverrideCursor(); - abortCommand(); + wc.suspend(); + abortCommand(); showError(); } else { @@ -423,9 +426,8 @@ bool RepairGUI_GlueDlg::onAcceptLocal( const bool publish, const bool useTransac // JFA 28.12.2004 BEGIN // To enable warnings if ( !getOperation()->_is_nil() ) { if ( !getOperation()->IsDone() ) { - while( QApplication::overrideCursor() ) - QApplication::restoreOverrideCursor(); - QString msgw = QObject::tr( getOperation()->GetErrorCode() ); + wc.suspend(); + QString msgw = QObject::tr( getOperation()->GetErrorCode() ); SUIT_MessageBox::warn1((QWidget*)(SUIT_Session::session()->activeApplication()->desktop()), QObject::tr( "WRN_WARNING" ), msgw, -- 2.39.2