0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-09-23 08:29:07 +03:00

Proxy model has been fixed

This commit is contained in:
Arin Alexander
2018-07-12 21:09:18 +03:00
parent 7863c62736
commit 29379c1e1b
3 changed files with 22 additions and 9 deletions

View File

@@ -113,8 +113,8 @@ void SQLEditDialog::accept()
if (ui->fieldsMap->rowCount()>0){
for(int i=0;i<ui->fieldsMap->rowCount();++i){
LimeReport::FieldsCorrelation fieldsCorrelation;
fieldsCorrelation.master=ui->fieldsMap->item(i,0)->data(Qt::DisplayRole).toString();
fieldsCorrelation.detail=ui->fieldsMap->item(i,1)->data(Qt::DisplayRole).toString();
fieldsCorrelation.master = ui->fieldsMap->item(i,0) ? ui->fieldsMap->item(i,0)->data(Qt::DisplayRole).toString() : "";
fieldsCorrelation.detail = ui->fieldsMap->item(i,1) ? ui->fieldsMap->item(i,1)->data(Qt::DisplayRole).toString() : "";
result.fieldMap.append(fieldsCorrelation);
}
}
@@ -351,4 +351,13 @@ void SQLEditDialog::hidePreview()
ui->pbHidePreview->setVisible(false);
}
void SQLEditDialog::on_pbDelField_clicked()
{
ui->fieldsMap->removeRow(ui->fieldsMap->currentRow());
}
} // namespace LimeReport

View File

@@ -73,6 +73,7 @@ private slots:
void on_rbProxy_clicked(bool checked);
void on_rbSubQuery_clicked(bool checked);
void on_pbAddField_clicked();
void on_pbDelField_clicked();
void initQueryMode();
void initSubQueryMode();
void initProxyMode();