Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix crash in rule paste
  • Loading branch information
NathanW2 committed Sep 14, 2013
1 parent 7ba1c4d commit 80a1341
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp
Expand Up @@ -420,7 +420,11 @@ void QgsRuleBasedRendererV2Widget::copy()
void QgsRuleBasedRendererV2Widget::paste()
{
const QMimeData* mime = QApplication::clipboard()->mimeData();
QModelIndex index = viewRules->selectionModel()->selectedRows().first();
QModelIndexList indexlist = viewRules->selectionModel()->selectedRows();
if ( indexlist.isEmpty() )
return;

QModelIndex index = indexlist.first();
mModel->dropMimeData( mime, Qt::CopyAction, index.row(), index.column(), index.parent() );
}

Expand Down

0 comments on commit 80a1341

Please sign in to comment.