| 435 | } |
| 436 | |
| 437 | void QmitkAbstractMultiWidget::RemoveRenderWindowWidget() |
| 438 | { |
| 439 | // Walk the map in reverse and remove the lexicographically last entry. |
| 440 | // Using the map directly (rather than 'GetNameFromIndex(count-1)') keeps |
| 441 | // this safe for layouts whose cell names are not the legacy positional |
| 442 | // 'widget<i>' form, e.g. v2 layouts with custom names. |
| 443 | if (m_Impl->m_RenderWindowWidgets.empty()) |
| 444 | { |
| 445 | return; |
| 446 | } |
| 447 | |
| 448 | auto last = std::prev(m_Impl->m_RenderWindowWidgets.end()); |
| 449 | RenderWindowWidgetPointer renderWindowWidgetToRemove = last->second; |
| 450 | disconnect(renderWindowWidgetToRemove.get(), 0, 0, 0); |
| 451 | m_Impl->m_RenderWindowWidgets.erase(last); |
| 452 | } |
| 453 | |
| 454 | void QmitkAbstractMultiWidget::RemoveRenderWindowWidget(const QString& widgetName) |
| 455 | { |
no test coverage detected