Skip to content

Commit 9b34202

Browse files
committed
allow pasting of features in attribute table
1 parent 1e46196 commit 9b34202

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

src/app/qgsattributetabledialog.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,12 @@ void QgsAttributeTableDialog::on_mCopySelectedRowsButton_clicked()
536536
QgisApp::instance()->editCopy( mLayer );
537537
}
538538

539+
void QgsAttributeTableDialog::on_mPasteFeatures_clicked()
540+
{
541+
QgisApp::instance()->editPaste( mLayer );
542+
}
543+
544+
539545
void QgsAttributeTableDialog::on_mZoomMapToSelectedRowsButton_clicked()
540546
{
541547
QgisApp::instance()->mapCanvas()->zoomToSelected( mLayer );

src/app/qgsattributetabledialog.h

+4
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ class APP_EXPORT QgsAttributeTableDialog : public QDialog, private Ui::QgsAttrib
7373
* Copies selected rows to the clipboard
7474
*/
7575
void on_mCopySelectedRowsButton_clicked();
76+
/**
77+
* Paste features from the clipboard
78+
*/
79+
void on_mPasteFeatures_clicked();
7680
/**
7781
* Toggles editing mode
7882
*/

src/ui/qgsattributetabledialog.ui

+29
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,35 @@
348348
</property>
349349
</widget>
350350
</item>
351+
<item>
352+
<widget class="QToolButton" name="mPasteFeatures">
353+
<property name="toolTip">
354+
<string>Paste features from clipboard (Ctrl+V)</string>
355+
</property>
356+
<property name="whatsThis">
357+
<string/>
358+
</property>
359+
<property name="text">
360+
<string/>
361+
</property>
362+
<property name="icon">
363+
<iconset resource="../../images/images.qrc">
364+
<normaloff>:/images/themes/default/mActionEditPaste.png</normaloff>:/images/themes/default/mActionEditPaste.png</iconset>
365+
</property>
366+
<property name="iconSize">
367+
<size>
368+
<width>18</width>
369+
<height>18</height>
370+
</size>
371+
</property>
372+
<property name="shortcut">
373+
<string>Ctrl+V</string>
374+
</property>
375+
<property name="autoRaise">
376+
<bool>true</bool>
377+
</property>
378+
</widget>
379+
</item>
351380
<item>
352381
<widget class="Line" name="line_3">
353382
<property name="orientation">

0 commit comments

Comments
 (0)