git-svn-id: svn://db.shs.com.ru/libs@26 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -601,7 +601,8 @@ void SQLTableWidget::updateTable(bool save_selection) {
|
||||
cquery = custom_query;
|
||||
//qDebug() << cquery;
|
||||
model->setQuery(cquery, QSqlDatabase::database(connection_name));
|
||||
//qDebug() << model->lastError();
|
||||
if (model->lastError().isValid())
|
||||
qDebug() << model->lastError();
|
||||
if (first_update) {
|
||||
ui->view->resizeColumnsToContents();
|
||||
for (int i = 0; i < ui->view->horizontalHeader()->count(); ++i)
|
||||
@@ -618,7 +619,7 @@ void SQLTableWidget::updateTable(bool save_selection) {
|
||||
foreach (const QModelIndex & i, sl)
|
||||
sm->select(i, QItemSelectionModel::Select | QItemSelectionModel::Rows);
|
||||
sm->setCurrentIndex(csi, QItemSelectionModel::Select);
|
||||
ui->view->setFocus();
|
||||
//ui->view->setFocus();
|
||||
}
|
||||
if (custom_query.isEmpty()) {
|
||||
for (int i = 0; i < model->columnCount(); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user