Skip to content
Permalink
Browse files
Restore code to handle Mac double-click at startup which was dropped …
…by r9092.

git-svn-id: http://svn.osgeo.org/qgis/trunk@9106 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Aug 21, 2008
1 parent c2c6974 commit 9fa50d504f7fee7db986145e2e42a01242f3e76d
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/app/main.cpp
@@ -156,18 +156,21 @@ OSErr openDocumentsAEHandler(const AppleEvent *event, AppleEvent *reply, SRefCon
}
}

// Open files now if application has been fully initialized (has objectName).
// Otherwise (if this routine is called by processEvents inside the QgisApp constructor
// at startup) wait for the command line file loader to notice these files.
QgisApp *qgis = QgisApp::instance();
if(qgis)
if (qgis && qgis->objectName() == "QgisApp")
{
if (!myProjectFileName.isEmpty())
{
qgis->openProject(myProjectFileName);
qgis->openProject(myProjectFileName);
}
for (QStringList::Iterator myIterator = myFileList.begin();
myIterator != myFileList.end(); ++myIterator )
{
QString fileName = *myIterator;
qgis->openLayer(fileName);
QString fileName = *myIterator;
qgis->openLayer(fileName);
}
}
}

0 comments on commit 9fa50d5

Please sign in to comment.