From 8d1edf7252160846a45926475d6a3a76af14e88f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= <thorbjorn.lindeijer@nokia.com>
Date: Mon, 19 Jan 2009 11:03:23 +0100
Subject: [PATCH] Have the editor list combo adjust size to contents

Now the box will grow larger when files with long filenames are opened.
---
 .../coreplugin/editormanager/stackededitorgroup.cpp        | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp b/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp
index edceea70002..fee513e2e7b 100644
--- a/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp
+++ b/src/plugins/coreplugin/editormanager/stackededitorgroup.cpp
@@ -79,6 +79,7 @@ StackedEditorGroup::StackedEditorGroup(QWidget *parent) :
     tl->setMargin(0);
     {
         m_editorList->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+        m_editorList->setSizeAdjustPolicy(QComboBox::AdjustToContents);
         m_editorList->setMinimumContentsLength(20);
         m_proxyModel.setSourceModel(model());
         m_proxyModel.sort(0);
@@ -296,9 +297,9 @@ void StackedEditorGroup::setCurrentEditor(IEditor *editor)
 
 void StackedEditorGroup::checkEditorStatus()
 {
-        IEditor *editor = qobject_cast<IEditor *>(sender());
-        if (editor == currentEditor())
-            updateEditorStatus(editor);
+    IEditor *editor = qobject_cast<IEditor *>(sender());
+    if (editor == currentEditor())
+        updateEditorStatus(editor);
 }
 
 void StackedEditorGroup::updateEditorStatus(IEditor *editor)
-- 
GitLab