From: vsr Date: Wed, 22 Oct 2008 12:33:10 +0000 (+0000) Subject: Fix wrong signal/slot connection X-Git-Tag: V5_1_0a3~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b4148738ad812d5591f78d1c94908fa4bb6b54ed;p=modules%2Fgui.git Fix wrong signal/slot connection --- diff --git a/src/ObjBrowser/OB_Browser.cxx b/src/ObjBrowser/OB_Browser.cxx index 63ea37b3f..de8ba7667 100755 --- a/src/ObjBrowser/OB_Browser.cxx +++ b/src/ObjBrowser/OB_Browser.cxx @@ -162,8 +162,6 @@ OB_Browser::OB_Browser( QWidget* parent, QAbstractItemModel* model ) connect( myView, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) ); - connect( myView, SIGNAL( doubleClicked( QListViewItem* ) ), - this, SLOT( onDoubleClicked( QListViewItem* ) ) ); } diff --git a/src/Qtx/QtxTreeView.cxx b/src/Qtx/QtxTreeView.cxx index ea2e520d2..001aaf17d 100644 --- a/src/Qtx/QtxTreeView.cxx +++ b/src/Qtx/QtxTreeView.cxx @@ -377,11 +377,12 @@ void QtxTreeView::emitSortingEnabled( bool enabled ) void QtxTreeView::setModel( QAbstractItemModel* m ) { if( model() ) - disconnect( model(), SIGNAL( headerDataChanged( Qt::Orientation, int, int ) ), + disconnect( model(), SIGNAL( headerDataChanged( Qt::Orientation, int, int ) ), this, SLOT( onAppropriate( Qt::Orientation, int, int ) ) ); QTreeView::setModel( m ); - connect( model(), SIGNAL( headerDataChanged( Qt::Orientation, int, int ) ), - this, SLOT( onAppropriate( Qt::Orientation, int, int ) ) ); + if ( model() ) + connect( model(), SIGNAL( headerDataChanged( Qt::Orientation, int, int ) ), + this, SLOT( onAppropriate( Qt::Orientation, int, int ) ) ); } void QtxTreeView::onAppropriate( Qt::Orientation orient, int first, int last )