#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 );
+ //if( myMode!=BathymetryTextId )
+ activate( false );
}
void HYDROGUI_BathymetryOp::abortOperation()
{
foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths )
bath->GetShape()->TextLabels( isActivate );
- commit();
+ //commit();
+ if( isActivate )
+ connect( selectionMgr(), SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
+ else
+ disconnect( selectionMgr(), SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
break;
}
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 );
+ }
+
+ qApp->restoreOverrideCursor();
+}