Skip to content
Permalink
Browse files

do not init dualview if no layer

fix crash of QtDesigner with custom widgets
kudos to @m-kuhn
  • Loading branch information
3nids committed Jun 10, 2016
1 parent 895b955 commit 76bf6e0dc6cf7a1c84a3d0cc4fe7b8c1032e8eb0
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/gui/attributetable/qgsdualview.cpp
@@ -69,6 +69,9 @@ QgsDualView::QgsDualView( QWidget* parent )

void QgsDualView::init( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas, const QgsFeatureRequest &request, const QgsAttributeEditorContext &context )
{
if ( !layer )
return;

mEditorContext = context;

connect( mTableView, SIGNAL( willShowContextMenu( QMenu*, QModelIndex ) ), this, SLOT( viewWillShowContextMenu( QMenu*, QModelIndex ) ) );

0 comments on commit 76bf6e0

Please sign in to comment.
You can’t perform that action at this time.