Commit b9dcce99 authored by Thomas Friedrichsmeier's avatar Thomas Friedrichsmeier
Browse files

When adding tool windows (during start up or later), don't force them active.

parent 8efe5122
......@@ -143,6 +143,7 @@ void DetachedWindowContainer::slotReattach () {
RK_TRACE (APP);
RKWorkplace::mainWorkplace ()->attachWindow (captured);
captured->activate ();
}
void DetachedWindowContainer::closeEvent (QCloseEvent *e) {
......
......@@ -318,8 +318,8 @@ QWidget* KatePluginIntegrationWindow::createToolView (KTextEditor::Plugin *plugi
KatePluginToolWindow *window = new KatePluginToolWindow(RKWorkplace::mainWorkplace()->view());
window->setCaption(text);
window->setWindowIcon(icon);
RKWorkplace::mainWorkplace()->placeInToolWindowBar(window, pos);
RKToolWindowList::registerToolWindow(window, identifier, (RKToolWindowList::Placement) pos, 0);
RKWorkplace::mainWorkplace()->placeInToolWindowBar(window, pos);
plugin_resources[plugin].windows.append(window);
return window;
......
......@@ -144,7 +144,6 @@ void RKToolWindowBar::addWidget (RKMDIWindow *window) {
if (window->tool_window_bar) {
window->tool_window_bar->removeWidget (window);
}
closeOthers (window);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5,13,0)
appendTab (window->windowIcon (), id, window->shortCaption ());
......@@ -169,6 +168,8 @@ void RKToolWindowBar::addWidget (RKMDIWindow *window) {
void RKToolWindowBar::reclaimDetached (RKMDIWindow *window) {
RK_TRACE (APP);
if (window->parent () == container) return;
window->hide();
window->setParent (container);
container->layout ()->addWidget (window);
......
......@@ -214,7 +214,7 @@ void RKWorkplace::attachWindow (RKMDIWindow *window) {
}
RK_ASSERT (window->getPart ());
RKWardMainWindow::getMain ()->partManager ()->addPart (window->getPart ());
RKWardMainWindow::getMain ()->partManager ()->addPart (window->getPart (), false);
}
void RKWorkplace::detachWindow (RKMDIWindow *window, bool was_attached) {
......@@ -304,7 +304,6 @@ void RKWorkplace::placeToolWindows() {
foreach (const RKToolWindowList::ToolWindowRepresentation& rep, RKToolWindowList::registeredToolWindows ()) {
placeInToolWindowBar (rep.window, rep.default_placement);
getHistory ()->popLastWindow (rep.window); // windows send a spurious activation signal triggered from KPartsManager::addPart(), so we pop them, again
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment