mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Mods after testing the copy/paste of attribute table data through a Windows
X server. Still requires testing on a Windows and Mac version of Qgis git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4132 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
8f31f4d47d
commit
0f5e4421fb
@ -398,8 +398,18 @@ void QgsAttributeTable::copySelectedRows()
|
||||
std::cerr << "Selected data in table is:\n" << toClipboard;
|
||||
#endif
|
||||
// And then copy to the clipboard
|
||||
QClipboard* clipboard = QApplication::clipboard();
|
||||
clipboard->setText(toClipboard);
|
||||
QClipboard* clipboard = QApplication::clipboard();
|
||||
|
||||
// With qgis running under Linux, but with a Windows based X
|
||||
// server (Xwin32), ::Selection was necessary to get the data into
|
||||
// the Windows clipboard (which seems contrary to the Qt
|
||||
// docs). With a Linux X server, ::Clipboard was required.
|
||||
// The simple solution was to put the text into both clipboards.
|
||||
|
||||
// The ::Selection setText() below one may need placing inside so
|
||||
// #ifdef so that it doesn't get compiled under Windows.
|
||||
clipboard->setText(toClipboard, QClipboard::Selection);
|
||||
clipboard->setText(toClipboard, QClipboard::Clipboard);
|
||||
}
|
||||
|
||||
bool QgsAttributeTable::commitChanges(QgsVectorLayer* layer)
|
||||
|
Loading…
x
Reference in New Issue
Block a user