@@ -172,12 +172,23 void VariableInspectorWidget::onTableMenuRequested(const QPoint &pos) noexcept | |||
|
172 | 172 | |
|
173 | 173 | // Adds menu-specific actions |
|
174 | 174 | if (!selectedVariables.isEmpty()) { |
|
175 | tableMenu.addSeparator(); | |
|
176 | ||
|
177 | // 'Rename' action (only if one variable selected) | |
|
178 | if (selectedVariables.size() == 1) { | |
|
179 | auto selectedVariable = selectedVariables.front(); | |
|
180 | ||
|
181 | auto renameFun = [&selectedVariable, &model, this]() { | |
|
182 | }; | |
|
183 | ||
|
184 | tableMenu.addAction(tr("Rename..."), renameFun); | |
|
185 | } | |
|
186 | ||
|
175 | 187 | // 'Delete' action |
|
176 | 188 | auto deleteFun = [&selectedVariables]() { |
|
177 | 189 | sqpApp->variableController().deleteVariables(selectedVariables); |
|
178 | 190 | }; |
|
179 | 191 | |
|
180 | tableMenu.addSeparator(); | |
|
181 | 192 | tableMenu.addAction(QIcon{":/icones/delete.png"}, tr("Delete"), deleteFun); |
|
182 | 193 | } |
|
183 | 194 |
General Comments 0
You need to be logged in to leave comments.
Login now