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

Commit

Permalink
TreeSelChange fixes (menu/statistics/dependency refresh)
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.pgadmin.org/branches/REL-1_2_0_PATCHES@3983 a7884b65-44f6-0310-8a51-81a127f17b15
  • Loading branch information
Andreas Pflug committed Feb 14, 2005
1 parent bd6f65b commit 19280cd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/schema/pgDatabase.cpp
Expand Up @@ -290,10 +290,12 @@ void pgDatabase::ShowTreeDetail(wxTreeCtrl *browser, frmMain *form, ctlListView
if (Connect() == PGCONN_OK)
{
// Set the icon if required
if (browser->GetItemImage(GetId(), wxTreeItemIcon_Normal) != 2)
if (browser->GetItemImage(GetId(), wxTreeItemIcon_Normal) != PGICON_DATABASE)
{
browser->SetItemImage(GetId(), PGICON_DATABASE, wxTreeItemIcon_Normal);
browser->SetItemImage(GetId(), PGICON_DATABASE, wxTreeItemIcon_Selected);
browser->SetItemImage(GetId(), PGICON_DATABASE, wxTreeItemIcon_Selected);
if (form)
form->SetButtons(this);
}

// Add child nodes if necessary
Expand Down
8 changes: 8 additions & 0 deletions src/ui/events.cpp
Expand Up @@ -688,6 +688,10 @@ void frmMain::execSelChange(wxTreeItemId item, bool currentNode)
if (currentNode)
{
properties->ClearAll();
statistics->ClearAll();
referencedBy->ClearAll();
dependsOn->ClearAll();

properties->AddColumn(_("Properties"), 500);
properties->InsertItem(0, _("No properties are available for the current selection"), PGICON_PROPERTY);
sqlPane->Clear();
Expand All @@ -709,9 +713,13 @@ void frmMain::execSelChange(wxTreeItemId item, bool currentNode)
{
properties->Freeze();
statistics->Freeze();
referencedBy->Freeze();
dependsOn->Freeze();
setDisplay(currentObject, properties, sqlPane);
properties->Thaw();
statistics->Thaw();
referencedBy->Thaw();
dependsOn->Thaw();
}
else
setDisplay(currentObject, 0, 0);
Expand Down

0 comments on commit 19280cd

Please sign in to comment.