Skip to content

Commit

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

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

Expand Down

0 comments on commit b775176

Please sign in to comment.