lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] switch census view to use wxDataViewCtrl


From: Václav Slavík
Subject: Re: [lmi] switch census view to use wxDataViewCtrl
Date: Tue, 2 Aug 2011 19:31:29 +0200

Hi,

On 2 Aug 2011, at 17:21, Greg Chicares wrote:
> Introducing a new topic: after
>  Census | Add cell
> it would probably be better to select the newly-added cell (even though
> the old listview-based implementation didn't do that). Can you show me how
> to do that please?


diff --git a/census_view.cpp b/census_view.cpp
index fca2f19..1c96c4b 100644
--- a/census_view.cpp
+++ b/census_view.cpp
@@ -853,6 +853,9 @@ void CensusView::UponAddCell(wxCommandEvent&)
 
     Update();
     document().Modify(true);
+
+    list_window_->UnselectAll();
+    list_window_->Select(list_model_->GetItem(list_model_->GetCount() - 1));
 }
 
 void CensusView::UponDeleteCells(wxCommandEvent&)

Regards,
Vaclav



reply via email to

[Prev in Thread] Current Thread [Next in Thread]