From 538fdcc5476d7b6d53a4b7569b9b0d06aa38d520 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 4 May 2023 21:00:38 -0400 Subject: [PATCH] Show module ID in Module's Info menu. --- src/app/ModuleWidget.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/ModuleWidget.cpp b/src/app/ModuleWidget.cpp index de070da5..7caf318e 100644 --- a/src/app/ModuleWidget.cpp +++ b/src/app/ModuleWidget.cpp @@ -990,6 +990,12 @@ void ModuleWidget::createContextMenu() { // Info menu->addChild(createSubmenuItem("Info", "", [=](ui::Menu* menu) { model->appendContextMenu(menu); + + if (!weakThis) + return; + menu->addChild(new ui::MenuSeparator); + menu->addChild(createMenuLabel("Module instance ID:")); + menu->addChild(createMenuLabel(string::f("%lld", (long long) weakThis->module->getId()))); })); // Preset