Commit 8d1edf72 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Have the editor list combo adjust size to contents

Now the box will grow larger when files with long filenames are opened.
parent cc5ff1ec
......@@ -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)
......
Markdown is supported
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