From: apo Date: Tue, 20 Nov 2007 15:41:58 +0000 (+0000) Subject: To call QApplication::setOverrideCursor(Qt::waitCursor) whenever ColoredPrs3d::Apply... X-Git-Tag: mergeto_BR_Dev_For_4_0_07-Dec-07~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fef60a5784983fc836f6629736013d7fb62e4ba4;p=modules%2Fvisu.git To call QApplication::setOverrideCursor(Qt::waitCursor) whenever ColoredPrs3d::Apply method is called --- diff --git a/src/VISUGUI/VisuGUI_FieldFilter.cxx b/src/VISUGUI/VisuGUI_FieldFilter.cxx index c2a0ca79..807d2157 100644 --- a/src/VISUGUI/VisuGUI_FieldFilter.cxx +++ b/src/VISUGUI/VisuGUI_FieldFilter.cxx @@ -96,7 +96,12 @@ bool VisuGUI_FieldFilter::isOk( const SUIT_DataOwner* theDataOwner ) const anInput.myFieldName = CORBA::string_dup( aFieldName.latin1() ); anInput.myTimeStampNumber = 1; + QApplication::setOverrideCursor(Qt::waitCursor); + size_t isOk = VISU::CheckIsPossible( myType, anInput, true ); + + QApplication::restoreOverrideCursor(); + return isOk > 0; } } diff --git a/src/VISUGUI/VisuGUI_InputPane.cxx b/src/VISUGUI/VisuGUI_InputPane.cxx index 90915b17..b468e4fb 100644 --- a/src/VISUGUI/VisuGUI_InputPane.cxx +++ b/src/VISUGUI/VisuGUI_InputPane.cxx @@ -409,6 +409,8 @@ void VisuGUI_InputPane::onSelectionChanged() if( myReInit->isChecked() && myPrs ) { + QApplication::setOverrideCursor(Qt::waitCursor); + myPrs->SetResultObject( myResult ); myPrs->SetMeshName( aMeshName.latin1() ); myPrs->SetEntity( VISU::Entity( myEntity ) ); @@ -417,6 +419,8 @@ void VisuGUI_InputPane::onSelectionChanged() myPrs->Apply( true ); myDialog->initFromPrsObject( myPrs, false ); + + QApplication::restoreOverrideCursor(); } } } @@ -425,9 +429,13 @@ void VisuGUI_InputPane::onSelectionChanged() //--------------------------------------------------------------- void VisuGUI_InputPane::changeTimeStamp( int theTimeStamp ) { + QApplication::setOverrideCursor(Qt::waitCursor); + myPrs->SetTimeStampNumber( myPrs->GetTimeStampNumberByIndex( theTimeStamp ) ); myPrs->Apply( true ); myDialog->initFromPrsObject( myPrs, false ); + + QApplication::restoreOverrideCursor(); } diff --git a/src/VISUGUI/VisuGUI_Slider.cxx b/src/VISUGUI/VisuGUI_Slider.cxx index fe6cf3eb..2e6c8c0e 100644 --- a/src/VISUGUI/VisuGUI_Slider.cxx +++ b/src/VISUGUI/VisuGUI_Slider.cxx @@ -436,7 +436,11 @@ void VisuGUI_Slider::onValueChanged( int value ) VISU::ColoredPrs3dHolder::BasicInput_var anInput = aHolder->GetBasicInput(); anInput->myTimeStampNumber = aNumber; + QApplication::setOverrideCursor(Qt::waitCursor); + aHolder->Apply( aPrs3d, anInput, myView3D ); + + QApplication::restoreOverrideCursor(); } updateMemoryState();