Skip to content

Commit

Permalink
[BUGFIX] Bring back VATSIM prefile
Browse files Browse the repository at this point in the history
Although I guess that nearly nobody uses that now in times of SimBrief,
it has been repaired...
  • Loading branch information
jonaseberle committed Jun 13, 2023
1 parent 7139664 commit ca69901
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/dialogs/PlanFlightDialog.cpp
Expand Up @@ -52,8 +52,6 @@ PlanFlightDialog::PlanFlightDialog(QWidget* parent)
treeRoutes->sortByColumn(0, Qt::AscendingOrder);
connect(treeRoutes, &QAbstractItemView::clicked, this, &PlanFlightDialog::routeSelected);

pbVatsimPrefile->setVisible(Settings::downloadNetwork() == 1); // only for VATSIM

lblPlotStatus->setText(QString(""));
linePlotStatus->setVisible(false);
gbResults->setTitle("Results");
Expand Down Expand Up @@ -340,8 +338,13 @@ void PlanFlightDialog::on_pbCopyToClipboard_clicked() {
void PlanFlightDialog::on_pbVatsimPrefile_clicked() {
if (selectedRoute != 0) {
QUrl url = QUrl(
QString("http://www.vatsim.net/fp/?1=I&5=%1&9=%2&8=%3&voice=/V/")
.arg(selectedRoute->dep, selectedRoute->dest, selectedRoute->route)
QString("https://my.vatsim.net/pilots/flightplan?departure=%1&arrival=%2&route=%3&rmk=%4")
.arg(
QUrl::toPercentEncoding(selectedRoute->dep),
QUrl::toPercentEncoding(selectedRoute->dest),
QUrl::toPercentEncoding(selectedRoute->route),
QUrl::toPercentEncoding("TCAS Simbrief lol no")
)
, QUrl::TolerantMode
);
if (url.isValid()) {
Expand Down

0 comments on commit ca69901

Please sign in to comment.