From e9a67fc247758a8f590e82f1277463376e91058c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 2 Jun 2005 11:30:32 +0000 Subject: [PATCH] fixed asserts when clicking on bugs table priority and opened columns; updated copyrights git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/grid/griddemo.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/samples/grid/griddemo.cpp b/samples/grid/griddemo.cpp index 0fec752751..af1a576dae 100644 --- a/samples/grid/griddemo.cpp +++ b/samples/grid/griddemo.cpp @@ -4,7 +4,7 @@ // Author: Michael Bedward // Modified by: // RCS-ID: $Id$ -// Copyright: (c) Michael Bedward, Julian Smart +// Copyright: (c) Michael Bedward, Julian Smart, Vadim Zeitlin // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// @@ -935,8 +935,7 @@ void GridFrame::OnEditorHidden( wxGridEvent& ev ) void GridFrame::About( wxCommandEvent& WXUNUSED(ev) ) { (void)wxMessageBox( _T("\n\nwxGrid demo \n\n") - _T("Michael Bedward \n") - _T("mbedward@ozemail.com.au \n\n"), + _T("Michael Bedward, Julian Small, Vadim Zeitlin"), _T("About"), wxOK ); } @@ -1197,10 +1196,13 @@ wxString BugsGridTable::GetValue( int row, int col ) switch ( col ) { case Col_Id: + return wxString::Format(_T("%d"), gd.id); + case Col_Priority: + return wxString::Format(_T("%d"), gd.prio); + case Col_Opened: - wxFAIL_MSG(_T("unexpected column")); - break; + return gd.opened ? _T("1") : _T("0"); case Col_Severity: return severities[gd.severity]; @@ -1258,7 +1260,10 @@ void BugsGridTable::SetValue( int row, int col, const wxString& value ) } } -bool BugsGridTable::CanGetValueAs( int WXUNUSED(row), int col, const wxString& typeName ) +bool +BugsGridTable::CanGetValueAs(int WXUNUSED(row), + int col, + const wxString& typeName) { if ( typeName == wxGRID_VALUE_STRING ) { -- 2.45.2