Commit 453dc448 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

A bit less indirection

parent f230811f
......@@ -183,11 +183,11 @@ void DocumentToolBar::updateEditorStatus()
Core::IEditor *editor = m_documentWidget->textEditor();
if (editor->file()->isReadOnly()) {
m_lockButton->setIcon(Core::ICore::instance()->editorManager()->openedEditorsModel()->lockedIcon());
m_lockButton->setIcon(m_editorsListModel->lockedIcon());
m_lockButton->setEnabled(!editor->file()->fileName().isEmpty());
m_lockButton->setToolTip(tr("Make writable"));
} else {
m_lockButton->setIcon(Core::ICore::instance()->editorManager()->openedEditorsModel()->unlockedIcon());
m_lockButton->setIcon(m_editorsListModel->unlockedIcon());
m_lockButton->setEnabled(false);
m_lockButton->setToolTip(tr("File is writable"));
}
......
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