*GridCtrl: fixed incorrect toolbar delete button status if keep_last_row is set to true and only one row is visible

git-svn-id: svn://ultimatepp.org/upp/trunk@2542 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
unodgs 2010-07-18 11:02:13 +00:00
parent fc02cb1f0b
commit 8b9290c5ff

View file

@ -291,7 +291,7 @@ void GridCtrl::StdToolBar(Bar &bar)
bar.Add(d && !ctrls, t_("Duplicate"), GridImg::Duplicate(), StdDuplicate);
if(removing)
bar.Add(d/* && !IsNewRow()*/, t_("Delete "), GridImg::Delete(), StdRemove);
bar.Add(d && (keep_last_row ? GetCount() > 1 : true), t_("Delete "), GridImg::Delete(), StdRemove);
if(editing)
{