X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ImportLandCoverMapDlg.cxx;h=3ad5e1dcc1869bc7eabc66c51a6c28275a41ef40;hb=e3a588626a51ca8bde6decbf32d54409ae5b88ce;hp=f075284df30f018df491b770965bc76db2d1f07f;hpb=dbee981213585cb317e098b0d2a288761cd3d37b;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ImportLandCoverMapDlg.cxx b/src/HYDROGUI/HYDROGUI_ImportLandCoverMapDlg.cxx index f075284d..3ad5e1dc 100644 --- a/src/HYDROGUI/HYDROGUI_ImportLandCoverMapDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportLandCoverMapDlg.cxx @@ -269,7 +269,7 @@ void HYDROGUI_ImportLandCoverMapDlg::FillCorrespondenceTable(const QStringList& myCorrTableWidget->setHorizontalHeaderItem(0, aHeader_1); myCorrTableWidget->setHorizontalHeaderItem(1, aHeader_2); myCorrTableWidget->setHorizontalHeaderItem(2, aHeader_3); - myCorrTableWidget->horizontalHeader()->setResizeMode( QHeaderView::ResizeToContents ); + myCorrTableWidget->horizontalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents ); // for (int i = 0; i < aFCSize; i++) { @@ -294,8 +294,10 @@ void HYDROGUI_ImportLandCoverMapDlg::FillCorrespondenceTable(const QStringList& // for (int i = 0; i < aFCSize; i++) { - myCorrTableWidget->setItem(i, 2, new QTableWidgetItem); - myCorrTableWidget->item(i, 2)->setBackground(myStrColors[theDefCBIndices[i]]); + QTableWidgetItem* aTWI = new QTableWidgetItem; + aTWI->setBackground(myStrColors[theDefCBIndices[i]]); + aTWI->setFlags(Qt::NoItemFlags); + myCorrTableWidget->setItem(i, 2, aTWI); } } @@ -413,6 +415,16 @@ bool HYDROGUI_ImportLandCoverMapDlg::getDbfState() const return myDbfState; } +void HYDROGUI_ImportLandCoverMapDlg::setDbfRecordsNb(int theRecordsNbs) +{ + myDbfRecordsNbs = theRecordsNbs; +} + +int HYDROGUI_ImportLandCoverMapDlg::getDbfRecordsNb() const +{ + return myDbfRecordsNbs; +} + int HYDROGUI_ImportLandCoverMapDlg::getCurrentWizardIndex() const { return wizard()->currentIndex(); @@ -450,5 +462,10 @@ bool HYDROGUI_ImportLandCoverMapDlg::CheckFirstPageFilling() const SUIT_MessageBox::critical( module()->getApp()->desktop(), tr( "DBF_LOAD_ERROR" ), tr("DBF_LOAD_ERR_MESS")); return false; } + if (this->getAttrCheckBoxState() && this->getDbfRecordsNb() == 0) + { + SUIT_MessageBox::warning( module()->getApp()->desktop(), tr( "DBF_NB_RECORDS_IS_NULL" ), tr("DBF_NB_RECORDS_IS_NULL_MESS")); + return false; + } return true; -} \ No newline at end of file +}