Skip to content

Commit

Permalink
Fix geroreferencer crash when deleting a point through context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Polti authored and m-kuhn committed Apr 24, 2018
1 parent c86045e commit 92aebef
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/plugins/georeferencer/qgsgcplistwidget.cpp
Expand Up @@ -200,10 +200,6 @@ void QgsGCPListWidget::showContextMenu( QPoint p )
connect( removeAction, SIGNAL( triggered() ), this, SLOT( removeRow() ) );
m.addAction( removeAction );
m.exec( QCursor::pos(), removeAction );

index = static_cast<const QSortFilterProxyModel*>( model() )->mapToSource( index );
mPrevRow = index.row();
mPrevColumn = index.column();
}

void QgsGCPListWidget::removeRow()
Expand All @@ -219,7 +215,9 @@ void QgsGCPListWidget::editCell()

void QgsGCPListWidget::jumpToPoint()
{
QModelIndex index = static_cast<const QSortFilterProxyModel*>( model() )->mapToSource( currentIndex() );
QModelIndex index = static_cast<const QSortFilterProxyModel *>( model() )->mapToSource( currentIndex() );
mPrevRow = index.row();
mPrevColumn = index.column();
emit jumpToGCP( index.row() );
}

Expand Down

0 comments on commit 92aebef

Please sign in to comment.