]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/WorkAreaManager.cpp
GuiIdListModel: ignore DecorationRole (icons of available list)
[lyx.git] / src / frontends / WorkAreaManager.cpp
index b0eaaac6b1270f539671d005ba6cd5550aceee69..c79f08bef7d018787d059958b652a867e08df2c4 100644 (file)
@@ -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