#include <OCCViewer_ViewWindow.h>
#include <QtxDoubleSpinBox.h>
#include <SUIT_Desktop.h>
+#include <SUIT_SelectionMgr.h>
#include <QLayout>
#include <QPushButton>
+#include <QApplication>
HYDROGUI_BathymetryLimitsDlg::HYDROGUI_BathymetryLimitsDlg( QWidget* theParent )
: QDialog( theParent )
void HYDROGUI_BathymetryOp::commitOperation()
{
+ //if( myMode!=BathymetryTextId )
activate( false );
}
QList<Handle(HYDROGUI_BathymetryPrs)> baths = getShownBathymetries( module() );
bool isUpdateCS = false;
+ if( myMode!=BathymetryRescaleUserId )
+ qApp->setOverrideCursor( Qt::WaitCursor );
+
switch( myMode )
{
case BathymetryTextId:
{
foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths )
- bath->GetShape()->TextLabels( isActivate );
+ bath->GetShape()->TextLabels( isActivate, bath==baths.last() );
+ //commit();
+ if( isActivate )
+ connect( selectionMgr(), SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
+ else
+ disconnect( selectionMgr(), SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
break;
}
dlg.SetMinMax( min, max );
if( dlg.exec()==QDialog::Accepted )
{
+ qApp->setOverrideCursor( Qt::WaitCursor );
+
min = dlg.GetMin();
max = dlg.GetMax();
foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths )
if( isUpdateCS )
module()->getOCCDisplayer()->UpdateColorScale( getViewer( module() ) );
+
+ qApp->restoreOverrideCursor();
+}
+
+void HYDROGUI_BathymetryOp::onSelectionChanged()
+{
+ QList<Handle(HYDROGUI_BathymetryPrs)> baths = getShownBathymetries( module() );
+ bool isUpdateCS = false;
+
+ qApp->setOverrideCursor( Qt::WaitCursor );
+ if( myMode==BathymetryTextId )
+ {
+ foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths )
+ bath->GetShape()->TextLabels( true, bath==baths.last() );
+ }
+
+ qApp->restoreOverrideCursor();
}