X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2FWorkAreaManager.cpp;h=c79f08bef7d018787d059958b652a867e08df2c4;hb=e325c7cc6ab25fc7e0223b64019649fda8ef5ff8;hp=7970bfaf26a2dc7b6c3aa6c8d91c71c7cabbb450;hpb=fce745f111de3c3aae85a7bf81e41997d8d7e6c5;p=lyx.git diff --git a/src/frontends/WorkAreaManager.cpp b/src/frontends/WorkAreaManager.cpp index 7970bfaf26..c79f08bef7 100644 --- a/src/frontends/WorkAreaManager.cpp +++ b/src/frontends/WorkAreaManager.cpp @@ -11,16 +11,13 @@ #include -#include "WorkArea.h" - #include "WorkAreaManager.h" -using std::list; - -namespace lyx { +#include "Application.h" +#include "WorkArea.h" -extern bool quitting; +namespace lyx { namespace frontend { void WorkAreaManager::add(WorkArea * wa) @@ -35,26 +32,36 @@ void WorkAreaManager::remove(WorkArea * wa) } -void WorkAreaManager::redrawAll() +void WorkAreaManager::redrawAll(bool update_metrics) { - for (list::iterator it = work_areas_.begin(); - it != work_areas_.end(); ) { - (*it)->redraw(); - ++it; - } + for (WorkArea * wa : work_areas_) + wa->scheduleRedraw(update_metrics); } void WorkAreaManager::closeAll() { - if (quitting) - return; - while (!work_areas_.empty()) // WorkArea is de-registering itself. (*work_areas_.begin())->close(); } + +bool WorkAreaManager::unhide(Buffer * buf) +{ + if (!work_areas_.empty()) + return true; + return theApp()->unhide(buf); +} + + +void WorkAreaManager::updateTitles() +{ + for (WorkArea * wa : work_areas_) + wa->updateWindowTitle(); +} + + } // namespace frontend } // namespace lyx