]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/WorkAreaManager.cpp
Disable CheckTeX while buffer is processed
[lyx.git] / src / frontends / WorkAreaManager.cpp
index f938db4eb9d80306f6da263e11be708325b934d7..b98163ceccc26a4ef03c31158b3c5d33811e9bc4 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "WorkAreaManager.h"
 
+#include "Application.h"
 #include "WorkArea.h"
 
 
@@ -33,10 +34,8 @@ void WorkAreaManager::remove(WorkArea * wa)
 
 void WorkAreaManager::redrawAll(bool update_metrics)
 {
-       iterator it = work_areas_.begin();
-       iterator const en = work_areas_.end();
-       for (; it != en; ++it)
-               (*it)->redraw(update_metrics);
+       for (WorkArea * wa : work_areas_)
+               wa->redraw(update_metrics);
 }
 
 
@@ -48,14 +47,21 @@ void WorkAreaManager::closeAll()
 }
 
 
+bool WorkAreaManager::unhide(Buffer * buf)
+{
+       if (!work_areas_.empty())
+               return true;
+       return theApp()->unhide(buf);
+}
+
+
 void WorkAreaManager::updateTitles()
 {
-       iterator it = work_areas_.begin();
-       iterator const en = work_areas_.end();
-       for (; it != en; ++it)
-               (*it)->updateWindowTitle();
+       for (WorkArea * wa : work_areas_)
+               wa->updateWindowTitle();
 }
 
+
 } // namespace frontend
 } // namespace lyx