From 1a319b86ac71d9af6bb2a07e7deba7668479a3a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Thu, 26 Nov 2009 16:10:14 +0000 Subject: [PATCH] Documentation git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7645 383ad7c9-94d9-4d36-a494-682f7c89f535 --- Core/Core.hh | 8 +++++++- Core/openFunctions.cc | 18 ++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Core/Core.hh b/Core/Core.hh index d2c802bb..bc03176a 100644 --- a/Core/Core.hh +++ b/Core/Core.hh @@ -450,7 +450,13 @@ private: public : - /// Load an object from the commandline on application start + /** \brief Load an object from the commandline on application start + * + * This function is called before the event queue is executed. The filename and parameters + * are stored. After the event queue is started, all files in this list will be opened. + * This is necessary as the event queue has to run to schedule the events emitted + * during open operations. + */ void commandLineOpen(const char* _filename, bool asPolyMesh ); /// Execute a script from the command Line diff --git a/Core/openFunctions.cc b/Core/openFunctions.cc index 3e6a3c8c..5ec163ef 100644 --- a/Core/openFunctions.cc +++ b/Core/openFunctions.cc @@ -84,6 +84,7 @@ void Core::resetScenegraph( bool _resetTrackBall ) { void Core::slotGetAllFilters ( QStringList& _list){ + // Iterate over all types for (int i=0; i < (int)supportedTypes_.size(); i++){ QString f = supportedTypes_[i].plugin->getLoadFilters(); f = f.section(")",0,0).section("(",1,1).trimmed(); @@ -93,16 +94,17 @@ void Core::slotGetAllFilters ( QStringList& _list){ void Core::commandLineOpen(const char* _filename, bool asPolyMesh ){ - QString file(_filename); + QString file(_filename); - if ( !file.startsWith("/") && !file.contains(":") ) { - - file = QDir::currentPath(); - file += OpenFlipper::Options::dirSeparator(); - file += _filename; - } + // Modify filename to containe full paths + if ( !file.startsWith("/") && !file.contains(":") ) { + file = QDir::currentPath(); + file += OpenFlipper::Options::dirSeparator(); + file += _filename; + } - commandLineFileNames_.push_back(std::pair< std::string , bool >(file.toStdString(), asPolyMesh)); + // Add to the open list + commandLineFileNames_.push_back(std::pair< std::string , bool >(file.toStdString(), asPolyMesh)); } void Core::commandLineScript(const char* _filename ) { -- GitLab