dynamic_cast<OCCViewer_ViewManager*>( anApp->getViewManager( OCCViewer_Viewer::Type(), false ) );
if ( aViewManager ) {
connect( aViewManager, SIGNAL( mousePress( SUIT_ViewWindow*, QMouseEvent* ) ),
- aPanel, SLOT( onMousePress( SUIT_ViewWindow*, QMouseEvent* ) ) );
+ aPanel, SLOT( onMousePress( SUIT_ViewWindow*, QMouseEvent* ) ),
+ Qt::UniqueConnection );
}
connect( anApp->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
- this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) );
+ this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ), Qt::UniqueConnection );
}
void HYDROGUI_GeoreferencementOp::abortOperation()
{
+ LightApp_Application* anApp = module()->getApp();
+ if ( anApp && anApp->desktop() ) {
+ anApp->desktop()->disconnect( this );
+ }
+
HYDROGUI_Operation::abortOperation();
}
void HYDROGUI_GeoreferencementOp::commitOperation()
{
+ LightApp_Application* anApp = module()->getApp();
+ if ( anApp && anApp->desktop() ) {
+ anApp->desktop()->disconnect( this );
+ }
+
HYDROGUI_Operation::commitOperation();
}
::qobject_cast<HYDROGUI_GeoreferencementDlg*>( inputPanel() );
if ( aPanel ) {
connect( aViewManager, SIGNAL( mousePress( SUIT_ViewWindow*, QMouseEvent* ) ),
- aPanel, SLOT( onMousePress( SUIT_ViewWindow*, QMouseEvent* ) ) );
+ aPanel, SLOT( onMousePress( SUIT_ViewWindow*, QMouseEvent* ) ),
+ Qt::UniqueConnection);
}
}
}