diff --git a/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitPluginWidgetController.cpp b/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitPluginWidgetController.cpp index 05edf2dbba6fc7c1f8cf7d4397ec96f2d0d51572..51d48f85c3b5975063373f0a838259adae5878e2 100644 --- a/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitPluginWidgetController.cpp +++ b/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitPluginWidgetController.cpp @@ -321,6 +321,7 @@ void RobotUnitPluginWidgetController::packageEditChanged() widget.pushButtonLoadLib->setEnabled(true); widget.labelPackageFound->setPixmap(QPixmap(":/icons/user-online.svg").scaled(16, 16)); widget.labelPackageFound->setToolTip("Found Package"); + int libidx = -1; for (const std::string& lib : Split(pFinder.getLibs(), ",; ", true)) { if (lib.empty()) @@ -334,6 +335,11 @@ void RobotUnitPluginWidgetController::packageEditChanged() std::string shortName = lib.substr(libSubstrStart, libSubstrEnd); libShortNameToFileName[shortName] = lib; widget.comboBoxLibrary->addItem(QString::fromStdString(shortName)); + if (libidx == -1 && (lib.find("Controller") != lib.npos || lib.find("controller") != lib.npos)) + { + libidx = libShortNameToFileName.size() - 1 ; + } + widget.comboBoxLibrary->setCurrentIndex(libidx); } } else