Skip to content
Snippets Groups Projects
Commit 7ecbcd48 authored by Fabian Reister's avatar Fabian Reister
Browse files

Extended log: dropping app into scenario from upstream package

parent e5996397
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@
#include <QMessageBox>
#include <sstream>
#include <QApplication>
#include <SimoxUtility/algorithm/string/string_tools.h>
using namespace ScenarioManager;
using namespace Controller;
......@@ -337,13 +338,17 @@ void ScenarioListController::addApplicationsToScenario(
{
return;
}
if (std::find(acceptedApps.begin(), acceptedApps.end(), appPackage->getName()) == acceptedApps.end())
{
const std::string dependenciesStr = simox::alg::join(acceptedApps, ", ");
QMessageBox box;
QString message("You cannot drop an App from ");
QString message("You cannot drop an app from ");
message.append(QString::fromStdString(appPackage->getName()));
message.append(" into a Scenario from ");
message.append(" into a scenario from ");
message.append(QString::fromStdString(scenario->getPackage()->getName()));
message.append(QString::fromStdString(". Package `" + scenario->getPackage()->getName() + "` depends on " + dependenciesStr));
box.setText(message);
box.exec();
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment