Skip to content

Commit

Permalink
Fixed bug where you could not use Find in the variables configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Dec 30, 2010
1 parent 7c78118 commit 0079c5d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions dialogs/world_prefs/prefspropertypages.cpp
Expand Up @@ -7766,6 +7766,21 @@ void CPrefsP18::OnFindNext()
DoFind (true);
} // end of CPrefsP18::OnFindNext

CString CPrefsP18::GetFindText (CObject * pItem) const
{
CVariable * variable_item = (CVariable *) pItem;

ASSERT_VALID (variable_item);
ASSERT( variable_item->IsKindOf( RUNTIME_CLASS( CVariable ) ) );


CString strResult = variable_item->strContents;

strResult += "\t" + variable_item->strLabel;

return strResult;

} // end of CPrefsP18::GetFindText

BOOL CPrefsP18::OnInitDialog()
{
Expand Down
2 changes: 1 addition & 1 deletion dialogs/world_prefs/prefspropertypages.h
Expand Up @@ -1535,7 +1535,7 @@ class CPrefsP18 : public CGenPropertyPage
virtual CString GetGroup (CObject * pItem) const { return ""; }; // get item group
virtual CString GetDescription (CObject * pItem) const { return ""; }; // get item description for tree control
virtual int GetSequence (CObject * pItem) const { return 0; }; // get item sequence for sorting
virtual CString GetFindText (CObject * pItem) const { return ""; }; // get text for searching on
virtual CString GetFindText (CObject * pItem) const; // get text for searching on

// list management - add the item to the list control
virtual int AddItem (CObject * pItem, // add one item to the list control
Expand Down

0 comments on commit 0079c5d

Please sign in to comment.