Skip to content

Commit

Permalink
hide crash prediction
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoudSmeur committed Feb 21, 2024
1 parent 6ec40fc commit 14eebfd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/widgets/map/mapwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -764,9 +764,9 @@ void MapWidget::handleNewAC(QString ac_id) {
auto crash_item = new WaypointItem(Point2DLatLon(0, 0), ac_id, 16);
crash_item->setStyle(GraphicsObject::Style::CRASH);
if(!show_crash_prediction_action->isChecked()) {
crash_item->setSize(0);
crash_item->setVisible(false);
} else {
crash_item->setSize(5);
crash_item->setVisible(true);
}
addItem(crash_item);

Expand Down Expand Up @@ -1415,9 +1415,9 @@ void MapWidget::showCrashPrediction(bool state) {
show_crash_prediction_action->blockSignals(false);
for(auto &itemManager: ac_items_managers) {
if(state) {
itemManager->getCrashItem()->setSize(5*2);
itemManager->getCrashItem()->setVisible(true);
} else {
itemManager->getCrashItem()->setSize(0);
itemManager->getCrashItem()->setVisible(false);
}
}
}

0 comments on commit 14eebfd

Please sign in to comment.