Force contiguous selection in ExtendedTableWidget

This commit is contained in:
Vladislav Tronko
2016-08-12 08:04:41 +03:00
parent d12fd1bf13
commit e607b8836a
2 changed files with 3 additions and 22 deletions

View File

@@ -96,28 +96,6 @@ void ExtendedTableWidget::copy()
}
}
// Check whether selection is rectangular
QItemSelection rect(indices.first(), indices.last());
bool correct = true;
foreach (const QModelIndex& index, indices)
if (!rect.contains(index)) {
correct = false;
break;
}
foreach (const QModelIndex& index, rect.indexes())
if (!indices.contains(index)) {
correct = false;
break;
}
if (!correct) {
QMessageBox::warning(this, QApplication::applicationName(),
tr("This function cannot be used with multiple independent selections."));
return;
}
m_buffer.clear();
// If any of the cells contain binary data - we use inner buffer