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() void GuiDocument::saveDefaultClicked()
{ {
saveDocDefault(); saveDocDefault();

View File

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

View File

@ -1217,11 +1217,6 @@ void GuiView::on_currentWorkAreaChanged(GuiWorkArea * wa)
void GuiView::on_bufferViewChanged() void GuiView::on_bufferViewChanged()
{ {
structureChanged(); 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 // Buffer-dependent dialogs must be updated. This is done here because
// some dialogs require buffer()->text. // some dialogs require buffer()->text.
updateDialogs(); updateDialogs();