Skip to content

Commit

Permalink
fix 3D
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Nov 28, 2023
1 parent 5fded80 commit cadd4b8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions bin/CRITERIA3D/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "dialogNewPoint.h"
#include "glWidget.h"
#include "dialogWaterFluxesSettings.h"
#include "utilities.h"

#include <QDebug>

Expand Down Expand Up @@ -1705,6 +1706,7 @@ void MainWindow::on_actionMeteoPointsImport_data_triggered()
myProject.importHourlyMeteoData(fileName, importAllFiles, true);
}


void MainWindow::on_actionNew_meteoPointsDB_from_csv_triggered()
{
QString templateFileName = myProject.getDefaultPath() + PATH_TEMPLATE + "template_meteo.db";
Expand Down Expand Up @@ -1740,15 +1742,16 @@ void MainWindow::on_actionNew_meteoPointsDB_from_csv_triggered()
myProject.meteoPointsDbHandler = new Crit3DMeteoPointsDbHandler(dbName);

QList<QString> pointPropertiesList;
if (!myProject.meteoPointsDbHandler->getNameColumn("point_properties", &pointPropertiesList))
if (!myProject.meteoPointsDbHandler->getFieldList("point_properties", pointPropertiesList))
{
myProject.logError("Error in read table point_properties");
return;
}
QList<QString> csvFields;
if (!myProject.parseMeteoPointsPropertiesCSV(csvFileName, &csvFields))
QList<QList<QString>> csvData;
if (! parseCSV(csvFileName, csvFields, csvData, myProject.errorString))
{
myProject.logError("Error in parse properties");
myProject.logError("Error in parse properties: " + myProject.errorString);
return;
}

Expand All @@ -1759,19 +1762,20 @@ void MainWindow::on_actionNew_meteoPointsDB_from_csv_triggered()
}
else
{
QList<QString> joinedList = dialogPointProp.getJoinedList();
/*QList<QString> joinedList = dialogPointProp.getJoinedList();
* TODO
if (! myProject.writeMeteoPointsProperties(joinedList))
{
myProject.logError("Error in write points properties");
return;
}
}*/
}

this->loadMeteoPointsDB_GUI(dbName);
loadMeteoPointsDB_GUI(dbName);
}


// --------------- LOAD DATA ------------------------------------
// ----------------------- SOIL and CROP DATA ------------------------------------

void MainWindow::on_actionLoad_soil_map_triggered()
{
Expand Down

0 comments on commit cadd4b8

Please sign in to comment.