| 322 | } |
| 323 | |
| 324 | void ContextBrowserView::setDeclaration(KDevelop::Declaration* decl, KDevelop::TopDUContext* topContext, bool force) |
| 325 | { |
| 326 | m_lastUsedTopContext = IndexedTopDUContext(topContext); |
| 327 | |
| 328 | if (isLocked() && (!m_navigationWidget.data() || !isVisible())) { |
| 329 | // Automatically remove the locked state if the view is not visible or the widget was deleted, |
| 330 | // because the locked state has side-effects on other navigation functionality. |
| 331 | m_autoLocked = false; |
| 332 | m_lockAction->setChecked(false); |
| 333 | } |
| 334 | |
| 335 | if (m_navigationWidgetDeclaration == decl->id() && !force) |
| 336 | return; |
| 337 | |
| 338 | m_navigationWidgetDeclaration = decl->id(); |
| 339 | |
| 340 | if (!isLocked() && (isVisible() || force)) { // NO-OP if tool view is hidden, for performance reasons |
| 341 | updateMainWidget(createWidget(decl, topContext)); |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | KDevelop::IndexedDeclaration ContextBrowserView::lockedDeclaration() const |
| 346 | { |
no test coverage detected