X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2FWorkAreaManager.cpp;h=a1c244ece7215c716771f39d9e2ac59999ec0bd2;hb=72af7f340ca8ee81c7e51633afbb3f9bd435356a;hp=a8c90309fd7ee804fad56dbc65cb621d625f7dfb;hpb=f0402e69c6073175b37932a90056700f0a064753;p=lyx.git diff --git a/src/frontends/WorkAreaManager.cpp b/src/frontends/WorkAreaManager.cpp index a8c90309fd..a1c244ece7 100644 --- a/src/frontends/WorkAreaManager.cpp +++ b/src/frontends/WorkAreaManager.cpp @@ -11,11 +11,10 @@ #include -#include "WorkArea.h" - #include "WorkAreaManager.h" -using std::list; +#include "WorkArea.h" + namespace lyx { namespace frontend { @@ -32,27 +31,28 @@ 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->redraw(update_metrics); } void WorkAreaManager::closeAll() { - for (list::iterator it = work_areas_.begin(); - it != work_areas_.end(); ) { - (*it)->close(); - if (work_areas_.empty()) - break; - ++it; - } + while (!work_areas_.empty()) + // WorkArea is de-registering itself. + (*work_areas_.begin())->close(); } + +void WorkAreaManager::updateTitles() +{ + for (WorkArea * wa : work_areas_) + wa->updateWindowTitle(); +} + + } // namespace frontend } // namespace lyx