#include <OCCViewer_ViewWindow.h>
#include <QtxDoubleSpinBox.h>
#include <SUIT_Desktop.h>
+#include <SUIT_SelectionMgr.h>
#include <QLayout>
#include <QPushButton>
#include <QApplication>
void HYDROGUI_BathymetryOp::commitOperation()
{
+ //if( myMode!=BathymetryTextId )
activate( false );
}
QList<Handle(HYDROGUI_BathymetryPrs)> baths = getShownBathymetries( module() );
bool isUpdateCS = false;
- qApp->setOverrideCursor( Qt::WaitCursor );
+ 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 )
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();
+}