Skip to content
Permalink
Browse files

disable dataset from activedatasetwidget (#36506)

  • Loading branch information
vcloarec committed May 18, 2020
1 parent 303a87b commit 32d341f0bcfffd66e03350fe3b583b86635890be
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/app/mesh/qgsmeshdatasetgrouptreeview.cpp
@@ -407,13 +407,19 @@ void QgsMeshActiveDatasetGroupTreeView::mousePressEvent( QMouseEvent *event )
bool isVector = idx.data( QgsMeshDatasetGroupTreeModel::IsVector ).toBool();
if ( isVector )
{
setActiveVectorGroup( idx.data( QgsMeshDatasetGroupTreeModel::DatasetGroupIndex ).toInt() );
int datasetIndex = idx.data( QgsMeshDatasetGroupTreeModel::DatasetGroupIndex ).toInt();
if ( datasetIndex == activeVectorGroup() )
datasetIndex = -1;
setActiveVectorGroup( datasetIndex );
processed = true;
}
}
else if ( mDelegate.iconRect( vr, false ).contains( event->pos() ) )
{
setActiveScalarGroup( idx.data( QgsMeshDatasetGroupTreeModel::DatasetGroupIndex ).toInt() );
int datasetIndex = idx.data( QgsMeshDatasetGroupTreeModel::DatasetGroupIndex ).toInt();
if ( datasetIndex == activeScalarGroup() )
datasetIndex = -1;
setActiveScalarGroup( datasetIndex );
processed = true;
}
}

0 comments on commit 32d341f

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