Skip to content

Commit

Permalink
allow pasting of features in attribute table
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed May 20, 2015
1 parent 1e46196 commit 9b34202
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/qgsattributetabledialog.cpp
Expand Up @@ -536,6 +536,12 @@ void QgsAttributeTableDialog::on_mCopySelectedRowsButton_clicked()
QgisApp::instance()->editCopy( mLayer );
}

void QgsAttributeTableDialog::on_mPasteFeatures_clicked()
{
QgisApp::instance()->editPaste( mLayer );
}


void QgsAttributeTableDialog::on_mZoomMapToSelectedRowsButton_clicked()
{
QgisApp::instance()->mapCanvas()->zoomToSelected( mLayer );
Expand Down
4 changes: 4 additions & 0 deletions src/app/qgsattributetabledialog.h
Expand Up @@ -73,6 +73,10 @@ class APP_EXPORT QgsAttributeTableDialog : public QDialog, private Ui::QgsAttrib
* Copies selected rows to the clipboard
*/
void on_mCopySelectedRowsButton_clicked();
/**
* Paste features from the clipboard
*/
void on_mPasteFeatures_clicked();
/**
* Toggles editing mode
*/
Expand Down
29 changes: 29 additions & 0 deletions src/ui/qgsattributetabledialog.ui
Expand Up @@ -348,6 +348,35 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="mPasteFeatures">
<property name="toolTip">
<string>Paste features from clipboard (Ctrl+V)</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionEditPaste.png</normaloff>:/images/themes/default/mActionEditPaste.png</iconset>
</property>
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="shortcut">
<string>Ctrl+V</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_3">
<property name="orientation">
Expand Down

0 comments on commit 9b34202

Please sign in to comment.