Skip to content

Commit

Permalink
Merge pull request #2047 from alexbruy/attrtable-paste
Browse files Browse the repository at this point in the history
[FEATURE] allow pasting of features in attribute table
  • Loading branch information
NathanW2 committed May 20, 2015
2 parents eaeea21 + 9b34202 commit 499c102
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 499c102

Please sign in to comment.