From: dpage Date: Wed, 20 May 2009 11:35:22 +0000 (+0000) Subject: Don't show package variables in wrapped packages [Ashesh Vashi] X-Git-Url: http://git.postgresql.org/gitweb/static/connections.php?a=commitdiff_plain;h=e4cb10cb360dbb4ce15ef10f4c820e6819e8c324;p=users%2Fquan74%2Fpgadmin-import.git Don't show package variables in wrapped packages [Ashesh Vashi] git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7875 a7884b65-44f6-0310-8a51-81a127f17b15 --- diff --git a/pgadmin/schema/edbPackageVariable.cpp b/pgadmin/schema/edbPackageVariable.cpp index 411dcec90..48b636cab 100644 --- a/pgadmin/schema/edbPackageVariable.cpp +++ b/pgadmin/schema/edbPackageVariable.cpp @@ -95,9 +95,17 @@ pgObject *edbPackageVariableFactory::CreateObjects(pgCollection *collection, ctl if (packageVariables) { + edbPackage* package = ((edbPackageObjCollection *)collection)->GetPackage(); + while (!packageVariables->Eof()) { - packageVariable = new edbPackageVariable(((edbPackageObjCollection *)collection)->GetPackage(), packageVariables->GetVal(wxT("eltname"))); + // Do not create edbPackageVariable, if package is wrapped + if (package->GetBody().Trim(false).StartsWith(wxT("$__EDBwrapped__$"))) + { + packageVariables->MoveNext(); + continue; + } + packageVariable = new edbPackageVariable(package, packageVariables->GetVal(wxT("eltname"))); packageVariable->iSetOid(packageVariables->GetOid(wxT("oid"))); packageVariable->iSetDataType(packageVariables->GetVal(wxT("datatype"))); if (packageVariables->GetVal(wxT("visibility")) == wxT("+"))