mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
OP-1122 removed debug spurious debug logging when using waypoint editor + fixed compilation warnings
This commit is contained in:
parent
390c88b92a
commit
1a25e87fde
@ -292,26 +292,21 @@ void WayPointItem::setRelativeCoord(distBearingAltitude value)
|
||||
|
||||
void WayPointItem::SetCoord(const internals::PointLatLng &value)
|
||||
{
|
||||
qDebug() << "1 SetCoord(" << value.Lat() << "," << value.Lng() << ")" << "OLD:" << Coord().Lat() << "," << Coord().Lng();
|
||||
if (qAbs(Coord().Lat() - value.Lat()) < 0.0001 && qAbs(Coord().Lng() - value.Lng()) < 0.0001) {
|
||||
qDebug() << "2 SetCoord nothing changed returning";
|
||||
return;
|
||||
}
|
||||
qDebug() << "3 setCoord there were changes";
|
||||
coord = value;
|
||||
distBearingAltitude back = relativeCoord;
|
||||
if (myHome) {
|
||||
map->Projection()->offSetFromLatLngs(myHome->Coord(), Coord(), back.distance, back.bearing);
|
||||
}
|
||||
if (qAbs(back.bearing - relativeCoord.bearing) > 0.01 || qAbs(back.distance - relativeCoord.distance) > 0.1) {
|
||||
qDebug() << "4 setCoord-relative coordinates where also updated";
|
||||
relativeCoord = back;
|
||||
}
|
||||
emit WPValuesChanged(this);
|
||||
RefreshPos();
|
||||
RefreshToolTip();
|
||||
this->update();
|
||||
qDebug() << "5 setCoord EXIT";
|
||||
}
|
||||
void WayPointItem::SetDescription(const QString &value)
|
||||
{
|
||||
|
@ -191,6 +191,7 @@ bool flightDataModel::setColumnByIndex(pathPlanData *row, const int index, const
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QVariant flightDataModel::getColumnByIndex(const pathPlanData *row, const int index) const
|
||||
{
|
||||
switch (index) {
|
||||
@ -285,7 +286,9 @@ QVariant flightDataModel::getColumnByIndex(const pathPlanData *row, const int in
|
||||
case LOCKED:
|
||||
return row->locked;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
QVariant flightDataModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (role == Qt::DisplayRole) {
|
||||
@ -394,7 +397,9 @@ QVariant flightDataModel::headerData(int section, Qt::Orientation orientation, i
|
||||
} else {
|
||||
return QAbstractTableModel::headerData(section, orientation, role);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool flightDataModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
if (role == Qt::EditRole) {
|
||||
@ -465,6 +470,7 @@ bool flightDataModel::insertRows(int row, int count, const QModelIndex & /*paren
|
||||
dataStorage.insert(row, data);
|
||||
}
|
||||
endInsertRows();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool flightDataModel::removeRows(int row, int count, const QModelIndex & /*parent*/)
|
||||
@ -478,6 +484,7 @@ bool flightDataModel::removeRows(int row, int count, const QModelIndex & /*paren
|
||||
dataStorage.removeAt(row);
|
||||
}
|
||||
endRemoveRows();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool flightDataModel::writeToFile(QString fileName)
|
||||
@ -617,6 +624,7 @@ bool flightDataModel::writeToFile(QString fileName)
|
||||
file.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
void flightDataModel::readFromFile(QString fileName)
|
||||
{
|
||||
// TODO warning message
|
||||
|
@ -76,7 +76,6 @@ void MapDataDelegate::setEditorData(QWidget *editor,
|
||||
int value = index.model()->data(index, Qt::EditRole).toInt();
|
||||
QComboBox *comboBox = static_cast<QComboBox *>(editor);
|
||||
int x = comboBox->findData(value);
|
||||
qDebug() << "VALUE=" << x;
|
||||
comboBox->setCurrentIndex(x);
|
||||
} else {
|
||||
QItemDelegate::setEditorData(editor, index);
|
||||
|
Loading…
x
Reference in New Issue
Block a user