diff options
Diffstat (limited to 'Source/FLTKDialog')
-rw-r--r-- | Source/FLTKDialog/CMakeSetupGUIImplementation.cxx | 32 | ||||
-rw-r--r-- | Source/FLTKDialog/CMakeSetupGUIImplementation.h | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx b/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx index 330e1ac..64d2ce4 100644 --- a/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx +++ b/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx @@ -7,6 +7,7 @@ #include "../cmCacheManager.h" #include "../cmMakefile.h" #include <iostream> +#include "FLTKPropertyList.h" @@ -254,6 +255,12 @@ void CMakeSetupGUIImplementation ::SaveCacheFromGUI( void ) { + this->FillCacheManagerFromCacheGUI(); + if( m_WhereBuild != "" ) + { + cmCacheManager::GetInstance()->SaveCache( + m_WhereBuild.c_str() ); + } } @@ -341,3 +348,28 @@ CMakeSetupGUIImplementation +/** + * Fill cache manager from Cache GUI + */ +void +CMakeSetupGUIImplementation +::FillCacheManagerFromCacheGUI( void ) +{ + cmCacheManager::GetInstance()->GetCacheMap(); + std::set<fltk::PropertyItem*> items = m_CacheEntriesList.GetItems(); + for(std::set<fltk::PropertyItem*>::iterator i = items.begin(); + i != items.end(); ++i) + { + fltk::PropertyItem* item = *i; + cmCacheManager::CacheEntry *entry = + cmCacheManager::GetInstance()->GetCacheEntry( + (const char*)item->m_propName.c_str() ); + if (entry) + { + entry->m_Value = item->m_curValue; + } + } + +} + + diff --git a/Source/FLTKDialog/CMakeSetupGUIImplementation.h b/Source/FLTKDialog/CMakeSetupGUIImplementation.h index 5149ee6..870f052 100644 --- a/Source/FLTKDialog/CMakeSetupGUIImplementation.h +++ b/Source/FLTKDialog/CMakeSetupGUIImplementation.h @@ -33,6 +33,7 @@ public: virtual void SaveCacheFromGUI( void ); virtual void LoadCacheFromDiskToGUI( void ); virtual void FillCacheGUIFromCacheManager( void ); + virtual void FillCacheManagerFromCacheGUI( void ); private: fltk::PropertyList m_CacheEntriesList; |