| 137 | } |
| 138 | |
| 139 | void MainWindowPrivate::changeActiveView(Sublime::View *view) |
| 140 | { |
| 141 | //disable updates on a window to avoid toolbar flickering on xmlgui client change |
| 142 | Sublime::HoldUpdates s(m_mainWindow); |
| 143 | mergeView(view); |
| 144 | |
| 145 | if(!view) |
| 146 | return; |
| 147 | |
| 148 | auto* doc = qobject_cast<KDevelop::IDocument*>(view->document()); |
| 149 | if (doc) |
| 150 | { |
| 151 | doc->activate(view, m_mainWindow); |
| 152 | } |
| 153 | else |
| 154 | { |
| 155 | //activated view is not a part document so we need to remove active part gui |
| 156 | ///@todo adymo: only this window needs to remove GUI |
| 157 | // KParts::Part *activePart = Core::self()->partController()->activePart(); |
| 158 | // if (activePart) |
| 159 | // guiFactory()->removeClient(activePart); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | void MainWindowPrivate::mergeView(Sublime::View* view) |
| 164 | { |