From 8b9290c5ffc5ebd58076bd2bfd68bd71e068f7ff Mon Sep 17 00:00:00 2001 From: unodgs Date: Sun, 18 Jul 2010 11:02:13 +0000 Subject: [PATCH] *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 --- uppsrc/GridCtrl/GridCtrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uppsrc/GridCtrl/GridCtrl.cpp b/uppsrc/GridCtrl/GridCtrl.cpp index ec1ac717a..5100bc701 100644 --- a/uppsrc/GridCtrl/GridCtrl.cpp +++ b/uppsrc/GridCtrl/GridCtrl.cpp @@ -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) {