Take advantage of new bufferViewChanged signal

This commit is contained in:
Guillaume Munch 2016-10-10 00:35:35 +02:00
parent c438d794ff
commit de19b8fc2d
3 changed files with 10 additions and 5 deletions

View File

@ -1456,6 +1456,13 @@ GuiDocument::GuiDocument(GuiView & lv)
}
void GuiDocument::on_bufferViewChanged()
{
if (isVisibleView())
initialiseParams("");
}
void GuiDocument::saveDefaultClicked()
{
saveDocDefault();

View File

@ -82,6 +82,9 @@ public:
///
BufferParams const & params() const { return bp_; }
public Q_SLOTS:
void on_bufferViewChanged();//override
private Q_SLOTS:
void updateNumbering();
void change_adaptor();

View File

@ -1217,11 +1217,6 @@ void GuiView::on_currentWorkAreaChanged(GuiWorkArea * wa)
void GuiView::on_bufferViewChanged()
{
structureChanged();
// The document settings needs to be reinitialised.
// TODO: no longer needed now there is bufferViewChanged?
updateDialog("document", "");
// Buffer-dependent dialogs must be updated. This is done here because
// some dialogs require buffer()->text.
updateDialogs();