[Kexi] branches/koffice/1.6/koffice/kexi/widget/tableview

Jaroslaw Staniek js at iidea.pl
Thu Jan 17 09:34:56 CET 2008


SVN commit 762477 by staniek:

A fix for data editing
- When a default value is specified for an field with 'required' flag, 
  it was not only applied when a new row is created, 
  but also when an existing row is edited, 
  thus overwriting the existing value. 

CCMAIL:155899-done at bugs.kde.org
CCMAIL:kexi at kde.org



 M  +1 -1      kexitableviewdata.cpp  


--- branches/koffice/1.6/koffice/kexi/widget/tableview/kexitableviewdata.cpp #762476:762477
@@ -628,7 +628,7 @@
 //(taken here for optimization)
 #define GET_VALUE if (!val) { \
 	val = m_cursor \
-				? m_pRowEditBuffer->at( *it_f.current()->columnInfo, true /* useDefaultValueIfPossible */ ) \
+				? m_pRowEditBuffer->at( *it_f.current()->columnInfo, (*it_r).isNull() /* useDefaultValueIfPossible */ ) \
 				: m_pRowEditBuffer->at( *f ); \
 	if (!val) \
 		val = &(*it_r); /* get old value */ \



More information about the Kexi mailing list