From 0137555479243d8b43bbfe000f0a71228ff1f2ec Mon Sep 17 00:00:00 2001 From: Dirk Wilden Date: Mon, 10 Nov 2008 14:07:37 +0000 Subject: [PATCH] -changed Color Type to RGBA -added option to ensure recent files are loaded with right options git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3671 383ad7c9-94d9-4d36-a494-682f7c89f535 --- Core/Core.cc | 5 ++++- common/GlobalOptions.cc | 11 +++++++++++ common/GlobalOptions.hh | 8 ++++++++ common/TriangleMeshTypes.hh | 3 +++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Core/Core.cc b/Core/Core.cc index daa09fcc..52df2a97 100644 --- a/Core/Core.cc +++ b/Core/Core.cc @@ -690,8 +690,11 @@ Core::slotRecentOpen(QAction* _action) if ( recentFiles[i].filename == _action->text() ){ if (recentFiles[i].type == DATA_NONE) loadSettings( recentFiles[i].filename ); - else + else{ + OpenFlipper::Options::loadingRecentFile(true); loadObject(recentFiles[i].type, recentFiles[i].filename); + OpenFlipper::Options::loadingRecentFile(false); + } break; } } diff --git a/common/GlobalOptions.cc b/common/GlobalOptions.cc index 061c217f..1f42b402 100644 --- a/common/GlobalOptions.cc +++ b/common/GlobalOptions.cc @@ -166,6 +166,9 @@ static bool enableBackup_ = true; /// Currently loading Settings? static bool loadingSettings_ = false; +/// Currently loading recent file? +static bool loadingRecentFile_ = false; + /// Currently saving Settings? static bool savingSettings_ = false; @@ -577,6 +580,14 @@ void savingSettings(bool _savingSettings ) { savingSettings_ = _savingSettings; } +bool loadingRecentFile( ) { + return loadingRecentFile_; +} + +void loadingRecentFile(bool _loadingRecentFile ) { + loadingRecentFile_ = _loadingRecentFile; +} + int* argc() { return argc_; } diff --git a/common/GlobalOptions.hh b/common/GlobalOptions.hh index eee5665e..1ad0446c 100644 --- a/common/GlobalOptions.hh +++ b/common/GlobalOptions.hh @@ -534,6 +534,14 @@ bool iconDir(QString _dir); DLLEXPORT void savingSettings(bool _savingSettings ); + /// currently loading recent file ? + DLLEXPORT + bool loadingRecentFile( ); + + /// currently loading recent file ? + DLLEXPORT + void loadingRecentFile(bool _loadingRecentFile ); + /** @} */ //=========================================================================== diff --git a/common/TriangleMeshTypes.hh b/common/TriangleMeshTypes.hh index 7648134d..070d4220 100644 --- a/common/TriangleMeshTypes.hh +++ b/common/TriangleMeshTypes.hh @@ -67,6 +67,9 @@ struct TriTraits : public OpenMesh::DefaultTraits /// Use double precision Normals typedef OpenMesh::Vec3d Normal; + /// Use double precision rgba Color + typedef OpenMesh::Vec4f Color; + }; /// Simple Name for Mesh -- GitLab