Salome HOME
Merge branch 'BR_1328' into BR_DEMO
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportLandCoverMapDlg.cxx
index d99c13e4a83535de39e21cc95cb03a0a8078bb90..3ad5e1dcc1869bc7eabc66c51a6c28275a41ef40 100644 (file)
@@ -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++)
   {
@@ -415,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();
@@ -452,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
+}