]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/new_gui.cxx
FlightRecorder: smarter log warning.
[flightgear.git] / src / GUI / new_gui.cxx
index 2202ab97d8733d31884d86aba198f4fa5b106335..eff8bbe2fb3379078c7d1531c4e33ce1dab0da30 100644 (file)
@@ -142,6 +142,7 @@ NewGUI::unbind ()
 void
 NewGUI::update (double delta_time_sec)
 {
+    SG_UNUSED(delta_time_sec);
     map<string,FGDialog *>::iterator iter = _active_dialogs.begin();
     for(/**/; iter != _active_dialogs.end(); iter++)
         iter->second->update();
@@ -289,10 +290,11 @@ NewGUI::newDialog (SGPropertyNode* props)
 void
 NewGUI::readDir (const SGPath& path)
 {
+    flightgear::NavDataCache* cache = flightgear::NavDataCache::instance();
+    flightgear::NavDataCache::Transaction txn(cache);
     simgear::Dir dir(path);
     simgear::PathList xmls = dir.children(simgear::Dir::TYPE_FILE, ".xml");
     
-    flightgear::NavDataCache* cache = flightgear::NavDataCache::instance();
     BOOST_FOREACH(SGPath xmlPath, xmls) {
       if (!cache->isCachedFileModified(xmlPath)) {
         // cached, easy
@@ -322,6 +324,8 @@ NewGUI::readDir (const SGPath& path)
       cache->stampCacheFile(xmlPath);
       cache->writeStringProperty(xmlPath.str(), name);
     } // of directory children iteration
+  
+    txn.commit();
 }\f
 ////////////////////////////////////////////////////////////////////////
 // Style handling.