X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2FWorkAreaManager.cpp;h=c79f08bef7d018787d059958b652a867e08df2c4;hb=a41d589e851a956ff27235841e6330bab552c0fe;hp=b0eaaac6b1270f539671d005ba6cd5550aceee69;hpb=34859c9a4fb66b038268b9444de85692c5fa5471;p=lyx.git diff --git a/src/frontends/WorkAreaManager.cpp b/src/frontends/WorkAreaManager.cpp index b0eaaac6b1..c79f08bef7 100644 --- a/src/frontends/WorkAreaManager.cpp +++ b/src/frontends/WorkAreaManager.cpp @@ -13,6 +13,7 @@ #include "WorkAreaManager.h" +#include "Application.h" #include "WorkArea.h" @@ -31,10 +32,10 @@ void WorkAreaManager::remove(WorkArea * wa) } -void WorkAreaManager::redrawAll() +void WorkAreaManager::redrawAll(bool update_metrics) { - for (iterator it = work_areas_.begin(); it != work_areas_.end(); ++it) - (*it)->redraw(); + for (WorkArea * wa : work_areas_) + wa->scheduleRedraw(update_metrics); } @@ -46,19 +47,21 @@ void WorkAreaManager::closeAll() } -void WorkAreaManager::setReadOnly(bool on) +bool WorkAreaManager::unhide(Buffer * buf) { - for (iterator it = work_areas_.begin(); it != work_areas_.end(); ++it) - (*it)->setReadOnly(on); + if (!work_areas_.empty()) + return true; + return theApp()->unhide(buf); } void WorkAreaManager::updateTitles() { - for (iterator it = work_areas_.begin(); it != work_areas_.end(); ++it) - (*it)->updateWindowTitle(); + for (WorkArea * wa : work_areas_) + wa->updateWindowTitle(); } + } // namespace frontend } // namespace lyx