Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Commit

Permalink
Set the trigger function schema correctly when viewing the function p…
Browse files Browse the repository at this point in the history
…roperties from under the trigger node, per Alexander Kirpa.

git-svn-id: svn://svn.pgadmin.org/trunk@5463 a7884b65-44f6-0310-8a51-81a127f17b15
  • Loading branch information
dpage committed Oct 11, 2006
1 parent 3d35dbc commit 7da659c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/dlg/dlgFunction.cpp
Expand Up @@ -79,7 +79,14 @@ END_EVENT_TABLE();

dlgProperty *pgFunctionFactory::CreateDialog(frmMain *frame, pgObject *node, pgObject *parent)
{
return new dlgFunction(this, frame, (pgFunction*)node, (pgSchema*)parent);
pgSchema *sch;

if (parent->GetMetaType() == PGM_TRIGGER)
sch = parent->GetSchema();
else
sch = (pgSchema*)parent;

return new dlgFunction(this, frame, (pgFunction*)node, sch);
}


Expand Down
1 change: 1 addition & 0 deletions src/include/misc.h
Expand Up @@ -70,6 +70,7 @@ enum
PGM_UNKNOWN,
PGM_FUNCTION,
PGM_TABLE,
PGM_TRIGGER,
PGM_VIEW,
PGM_SEQUENCE,
PGM_CONSTRAINT,
Expand Down
1 change: 1 addition & 0 deletions src/schema/pgTrigger.cpp
Expand Up @@ -246,6 +246,7 @@ pgObject *pgTriggerFactory::CreateObjects(pgCollection *coll, ctlTree *browser,
pgTriggerFactory::pgTriggerFactory()
: pgTableObjFactory(__("Trigger"), __("New Trigger..."), __("Create a new Trigger."), trigger_xpm)
{
metaType = PGM_TRIGGER;
}


Expand Down

0 comments on commit 7da659c

Please sign in to comment.