Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
disable dataset from activedatasetwidget (#36506)
  • Loading branch information
vcloarec committed May 18, 2020
1 parent 303a87b commit 32d341f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/mesh/qgsmeshdatasetgrouptreeview.cpp
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 32d341f

Please sign in to comment.