From: Julian Smart Date: Sat, 5 Sep 1998 22:36:13 +0000 (+0000) Subject: Removed some bugs X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1573d8ed987f98c212c5de19f18b042086794f71 Removed some bugs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/wxprop/src/proplist.cpp b/utils/wxprop/src/proplist.cpp index 9e9b60f053..edfc2aaa4e 100644 --- a/utils/wxprop/src/proplist.cpp +++ b/utils/wxprop/src/proplist.cpp @@ -80,7 +80,7 @@ BEGIN_EVENT_TABLE(wxPropertyListView, wxPropertyView) EVT_TEXT_ENTER(wxID_PROP_TEXT, wxPropertyListView::OnText) EVT_LISTBOX(wxID_PROP_SELECT, wxPropertyListView::OnPropertySelect) EVT_COMMAND(wxID_PROP_SELECT, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxPropertyListView::OnPropertyDoubleClick) - EVT_TEXT(wxID_PROP_VALUE_SELECT, wxPropertyListView::OnValueListSelect) + EVT_LISTBOX(wxID_PROP_VALUE_SELECT, wxPropertyListView::OnValueListSelect) END_EVENT_TABLE() bool wxPropertyListView::dialogCancelled = FALSE; @@ -425,9 +425,9 @@ bool wxPropertyListView::CreateControls(void) wxFont guiFont = settings.GetSystemFont(wxSYS_DEFAULT_GUI_FONT); #ifdef __WXMSW__ - wxFont *boringFont = wxTheFontList->FindOrCreateFont(guiFont.GetPointSize(), wxDEFAULT, wxNORMAL, wxNORMAL, FALSE, "Courier New"); + wxFont *boringFont = wxTheFontList->FindOrCreateFont(guiFont.GetPointSize(), wxMODERN, wxNORMAL, wxNORMAL, FALSE, "Courier New"); #else - wxFont *boringFont = wxTheFontList->FindOrCreateFont(guiFont.GetPointSize(), wxMODERN, wxNORMAL, wxNORMAL); + wxFont *boringFont = wxTheFontList->FindOrCreateFont(guiFont.GetPointSize(), wxTELETYPE, wxNORMAL, wxNORMAL); #endif // May need to be changed in future to eliminate clashes with app. @@ -661,9 +661,17 @@ void wxPropertyListView::ShowListBoxControl(bool show) if (constraints) { if (show) + { constraints->top.Below(valueList, 2); + // Maintain back-pointer so when valueList is deleted, + // any reference to it from this window is removed. + valueList->AddConstraintReference(propertyScrollingList); + } else + { constraints->top.Below(valueText, 2); + valueText->AddConstraintReference(propertyScrollingList); + } propertyWindow->Layout(); } } @@ -848,6 +856,10 @@ BEGIN_EVENT_TABLE(wxPropertyListPanel, wxPanel) EVT_SIZE(wxPropertyListPanel::OnSize) END_EVENT_TABLE() +wxPropertyListPanel::~wxPropertyListPanel() +{ +} + void wxPropertyListPanel::OnDefaultAction(wxControl *item) { /* @@ -1263,7 +1275,7 @@ bool wxStringListValidator::OnDisplayValue(wxProperty *property, wxPropertyListV return FALSE; wxString str(property->GetValue().GetStringRepresentation()); view->GetValueText()->SetValue(str.GetData()); - if (strings) + if (strings && view->GetValueList() && view->GetValueList()->Number() > 0) { view->GetValueList()->SetStringSelection(str.GetData()); } diff --git a/utils/wxprop/src/proplist.h b/utils/wxprop/src/proplist.h index 14897f62a8..5c066a5071 100644 --- a/utils/wxprop/src/proplist.h +++ b/utils/wxprop/src/proplist.h @@ -300,6 +300,7 @@ class wxPropertyListPanel: public wxPanel { view = v; } + ~wxPropertyListPanel(); void OnDefaultAction(wxControl *item); inline void SetView(wxPropertyListView* v) { view = v; }