ossp-pkg/as/as-gui/as_slot.cpp 1.104 -> 1.105
--- as_slot.cpp 2003/02/03 10:57:57 1.104
+++ as_slot.cpp 2003/02/03 11:04:23 1.105
@@ -97,11 +97,12 @@
QString Selection; // Will receive the clipboard text
QClipboard *pClip = NULL; // Will reference the global clipboard
- pClip = QApplication::clipboard(); // Prime the clips
- if (Selection = pClip->text(QClipboard::Clipboard)) { // Windows and Unix
- nRows = Selection.contains(QChar('\n')); // How many rows
- this->addEntry(nRows); // Reuse slot
- setRowdata(Selection); // Use accessor
+ pClip = QApplication::clipboard(); // Prime the clips
+ Selection = pClip->text(QClipboard::Clipboard); // Windows and Unix
+ nRows = Selection.contains(QChar('\n')); // How many rows
+ if (Selection != NULL && nRows > 0) { // Ignore empty clipboards
+ this->addEntry(nRows); // Reuse slot
+ setRowdata(Selection); // Use accessor
// Update line numbers for this new row and all subsequent rows
for (int nIter = m_pMaintable->currentRow(); nIter < m_pMaintable->numRows(); nIter++)
|
|