if (grid->GetTable()->CanGetValueAs(row, col, wxGRID_VALUE_BOOL))
m_startValue = grid->GetTable()->GetValueAsBool(row, col);
else
- m_startValue = !!grid->GetTable()->GetValue(row, col);
+ {
+ wxString cellval( grid->GetTable()->GetValue(row, col) );
+ m_startValue = !( !cellval || (cellval == "0") );
+ }
CBox()->SetValue(m_startValue);
CBox()->SetFocus();
}
if ( grid.GetTable()->CanGetValueAs(row, col, wxGRID_VALUE_BOOL) )
value = grid.GetTable()->GetValueAsBool(row, col);
else
- value = !!grid.GetTable()->GetValue(row, col);
+ {
+ wxString cellval( grid.GetTable()->GetValue(row, col) );
+ value = !( !cellval || (cellval == "0") );
+ }
if ( value )
{
wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider();
if (attrProvider) {
attrProvider->UpdateAttrRows( pos, -((int)numRows) );
-// ifdef'd out following patch from Paul Gammans
-#if 0
+// ifdef'd out following patch from Paul Gammans
+#if 0
+ // No need to touch column attributes, unless we
// removed _all_ rows, in this case, we remove
// all column attributes.
// I hate to do this here, but the
if (attrProvider) {
attrProvider->UpdateAttrCols( pos, -((int)numCols) );
// ifdef'd out following patch from Paul Gammans
-#if 0
+#if 0
// No need to touch row attributes, unless we
// removed _all_ columns, in this case, we remove
// all row attributes.
HideCellEditControl();
DisableCellEditControl();
- if ( IsVisible( m_currentCellCoords, FALSE ) ) // zzz
+ if ( IsVisible( m_currentCellCoords, FALSE ) )
{
wxRect r;
r = BlockToDeviceRect(m_currentCellCoords, m_currentCellCoords);
{
if ( !IsVisible( m_currentCellCoords ) )
{
- m_cellEditCtrlEnabled = false;
+ m_cellEditCtrlEnabled = FALSE;
return;
}
else