[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Updating visible columns after direct drill-down changes in census
From: |
Greg Chicares |
Subject: |
[lmi] Updating visible columns after direct drill-down changes in census manager |
Date: |
Fri, 15 Jun 2018 20:03:13 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
Vadim--I was going to ask you for help, but at each stage of drafting
this email, I saw one more thing I could do myself, then another, and
eventually I wound up doing everything myself...even though it would
have taken you two hours less. But I just can't bear not to send it
after all that effort; at least it has some value as documentation.
Let me jump right into a demonstration (using latest commit 735b39f60):
File | New | Census
Census | Edit cell...
check "Effective today"
OK
The "paste out" command appropriately becomes available (I'll improve
the ugly icon soon). Click it, or do
Census | Paste census out
and you'll get a 25-byte TSV file, as intended. However, now
uncheck the checkbox in the census-manager display
and the ugly icon doesn't get grayed out; click it, or do
Census | Paste census out
and a messagebox appears. (There's a little information on the statusbar
as well, at least until my next push.) Continuing the experiment...
check the checkbox in the census-manager display
Census | Edit cell...
UNcheck "Effective today"
OK
(instead of unchecking it on the census-manager screen). Now the command
is appropriately disabled.
This really has nothing to do with that command or its enablement. The
issue is that the "Effective Date Today" column ought to go away when
we uncheck it above--because that makes the column no longer vary across
cells [see CensusView::column_value_varies_across_cells()]. When we do
that through the tabbed dialog, CensusView::Update() is called, and the
dataview is updated. But when we edit the dataview control directly,
CensusView::Update() isn't called: I'd like to call it, and I imagine
that there must be some sort of change event I could react to, but...
oh, wait, I can RTFM and maybe answer my own question--it's
EVT_DATAVIEW_ITEM_VALUE_CHANGED(id, func)
And I can even read samples/dataview/dataview.cpp and do it myself:
commit e3a472882.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi] Updating visible columns after direct drill-down changes in census manager,
Greg Chicares <=