mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-04 00:30:59 -05:00
Merge pull request #32176 from 3nids/clear_warning
prevent clearing selection in QgsFeatureListView
This commit is contained in:
commit
3daf24c716
@ -135,8 +135,10 @@ void QgsFeatureListView::mousePressEvent( QMouseEvent *event )
|
|||||||
|
|
||||||
if ( QgsFeatureListViewDelegate::EditElement == mItemDelegate->positionToElement( event->pos() ) )
|
if ( QgsFeatureListViewDelegate::EditElement == mItemDelegate->positionToElement( event->pos() ) )
|
||||||
{
|
{
|
||||||
|
|
||||||
mEditSelectionDrag = true;
|
mEditSelectionDrag = true;
|
||||||
setEditSelection( mModel->mapToMaster( index ), QItemSelectionModel::ClearAndSelect );
|
if ( index.isValid() )
|
||||||
|
setEditSelection( mModel->mapToMaster( index ), QItemSelectionModel::ClearAndSelect );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -233,7 +235,8 @@ void QgsFeatureListView::mouseMoveEvent( QMouseEvent *event )
|
|||||||
|
|
||||||
if ( mEditSelectionDrag )
|
if ( mEditSelectionDrag )
|
||||||
{
|
{
|
||||||
setEditSelection( mModel->mapToMaster( index ), QItemSelectionModel::ClearAndSelect );
|
if ( index.isValid() )
|
||||||
|
setEditSelection( mModel->mapToMaster( index ), QItemSelectionModel::ClearAndSelect );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user