Version: 3.3.9x (svn sync 2006-11-10) (using KDE KDE 3.5.5) Installed from: Compiled From Sources Compiler: gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.1) OS: Linux When clicking the 'close' icon on the file tab bar, the first-opened file is closed, rather than the active one. PRECONDITIONS: 'Enable Split of Header/Source Files' in Project Options->C++ Support->Navigation turned on. An opened project with a .cpp and .h, neither of which is currently open, that will open in split-mode. STEPS TO REPRODUCE: 1. Open the .cpp - new tab with the .cpp is created, tab caption is "<foo>.cpp" 2. Open the .h - Single tab now splits into two, tab caption is "<foo>.h" 3. Click tab 'close' button ACTUAL RESULT: <foo>.cpp closes, leaving only <foo>.h open. EXPECTED RESULT: File that is active (i.e. has its name in the tab caption, i.e. "<foo>.h") is closed.
What UI mode are you in? (Settings->Configure KDevelop->UI Mode) It might be relevant.
Tested with IDEAL mode, KDE & KDevelop from svn, it works fine. If I'm on the C++ file, it closes the C++, if I'm inside the other part of the split view (the .h file), it closes that one.
Simplified IDEAL, using KDevelop 3.3.93 svn synced yesterday, I can still reproduce. C++ Support settings (Navigation) are: 'enable split'=yes 'auto sync'=yes, Orientation=Horizontal (this didn't seem to make a difference), and in Context Menu, 'Switch ...'=yes, 'Show Go To ...'=no, 'Show type ...'=yes. Turning off 'auto sync' didn't help, and I wouldn't expect any of the context menu stuff to have any effect.
Can't reproduce in RC2.
Hmm, just checked again in SVN (as of last week, I think, but more recently than RC2); no change. Anything suggestions on tracking this down? Might it be a problem in KATE?
Yes, you're right. It still exists.
SVN commit 615262 by dagerbo: Handle closing of multibuffers BUG: 137179 M +11 -1 simplemainwindow.cpp --- branches/kdevelop/3.4/src/simplemainwindow.cpp #615261:615262 @@ -54,6 +54,7 @@ #include "toplevel.h" #include "projectmanager.h" #include "editorproxy.h" +#include "multibuffer.h" SimpleMainWindow::SimpleMainWindow(QWidget* parent, const char *name) :DMainWindow(parent, name) @@ -847,7 +848,16 @@ QWidget *widget = EditorProxy::getInstance()->topWidgetForPart(part); if (widget && widget == w) { - PartController::getInstance()->closePart(part); + // weirdness beyond weirdness.. sometimes the active view is an embedded splitter with two files + // so we check if the widget is a multibuffer, in which case we let it decide what part to close + if (MultiBuffer * mb = dynamic_cast<MultiBuffer*>( widget ) ) + { + PartController::getInstance()->closePart( mb->activeBuffer() ); + } + else + { + PartController::getInstance()->closePart(part); + } return; } ++it;
Confirming that that fixed it. Thanks, Jens!