From e3432de0f6e4e921e41785f529ea21f7711db9e2 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sat, 14 Jun 2014 13:10:13 -0700 Subject: [PATCH] Show copy failed and clipboard in single dialog --- src/comm/QGCFlightGearLink.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/comm/QGCFlightGearLink.cc b/src/comm/QGCFlightGearLink.cc index e44ce57c0..fe6594b75 100644 --- a/src/comm/QGCFlightGearLink.cc +++ b/src/comm/QGCFlightGearLink.cc @@ -865,8 +865,6 @@ bool QGCFlightGearLink::connectSimulation() // Now that we made it this far, we should be able to try to copy the protocol file to FlightGear. bool succeeded = QFile::copy(qgcProtocolFileFullyQualified, fgProtocolFileFullyQualified); if (!succeeded) { - MainWindow::instance()->showCriticalMessage(tr("Copy failed"), tr("Copy from (%1) to (%2) failed, possibly due to permissions issue. You will need to perform manually.").arg(qgcProtocolFileFullyQualified).arg(fgProtocolFileFullyQualified)); - #ifdef Q_OS_WIN32 QString copyCmd = QString("copy \"%1\" \"%2\"").arg(qgcProtocolFileFullyQualified).arg(fgProtocolFileFullyQualified); copyCmd.replace("/", "\\"); @@ -877,9 +875,9 @@ bool QGCFlightGearLink::connectSimulation() QMessageBox msgBox(QMessageBox::Critical, tr("Copy failed"), #ifdef Q_OS_WIN32 - tr("Try pasting the following command into a Command Prompt which was started with Run as Administrator: ") + copyCmd, + tr("Copy from (%1) to (%2) failed, possibly due to permissions issue. You will need to perform manually. Try pasting the following command into a Command Prompt which was started with Run as Administrator:\n\n").arg(qgcProtocolFileFullyQualified).arg(fgProtocolFileFullyQualified) + copyCmd, #else - tr("Try pasting the following command into a shell: ") + copyCmd, + tr("Copy from (%1) to (%2) failed, possibly due to permissions issue. You will need to perform manually. Try pasting the following command into a shell:\n\n").arg(qgcProtocolFileFullyQualified).arg(fgProtocolFileFullyQualified) + copyCmd, #endif QMessageBox::Cancel, MainWindow::instance()); -- 2.22.0