diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 3562942452..f229bcac9b 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -262,7 +262,7 @@ Buffer::~Buffer() graphics::Previews::get().removeLoader(*this); if (pimpl_->wa_) { - pimpl_->wa_->closing(); + pimpl_->wa_->closeAll(); delete pimpl_->wa_; } } @@ -271,7 +271,7 @@ Buffer::~Buffer() void Buffer::changed() { if (pimpl_->wa_) - pimpl_->wa_->changed(); + pimpl_->wa_->redrawAll(); } diff --git a/src/frontends/WorkAreaManager.cpp b/src/frontends/WorkAreaManager.cpp index 710dfa13e4..e846cc1aff 100644 --- a/src/frontends/WorkAreaManager.cpp +++ b/src/frontends/WorkAreaManager.cpp @@ -18,18 +18,18 @@ namespace lyx { namespace frontend { -void WorkAreaManager::registerWorkArea(WorkArea * wa) +void WorkAreaManager::add(WorkArea * wa) { work_areas_.push_back(wa); } -void WorkAreaManager::changed() +void WorkAreaManager::redrawAll() { for (size_t i = 0; i != work_areas_.size(); ++i) work_areas_[i]->redraw(); } -void WorkAreaManager::closing() +void WorkAreaManager::closeAll() { for (size_t i = 0; i != work_areas_.size(); ++i) work_areas_[i]->close(); diff --git a/src/frontends/WorkAreaManager.h b/src/frontends/WorkAreaManager.h index 5d7e9cc0ef..7ff32127bb 100644 --- a/src/frontends/WorkAreaManager.h +++ b/src/frontends/WorkAreaManager.h @@ -25,13 +25,13 @@ public: WorkAreaManager() {} /// - void registerWorkArea(WorkArea * wa); + void add(WorkArea * wa); /// - void changed(); + void redrawAll(); /// - void closing(); + void closeAll(); private: std::vector work_areas_; diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index b18f14e3a5..24c82ffa07 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -860,7 +860,7 @@ WorkArea * GuiViewBase::addWorkArea(Buffer & buffer) // Hide tabbar if there's only one tab. d.tab_widget_->showBar(d.tab_widget_->count() > 1); /// - buffer.workAreaManager()->registerWorkArea(wa); + buffer.workAreaManager()->add(wa); return wa; }