Clarify uiTableModelRowDeleted API documentation.

* Require the deleted row to have been removed from the
  model before calling uiTableModelRowDeleted.
* Require the row count to be updated before calling
  uiTableModelRowDeleted.

Notes
-----

darwin: Does not care about row counts internally.

unix: Requires the row to have been deleted prior to
      calling this function:
      > This should be called by models after a row has been removed.
      > The location pointed to by path should be the location that the
      > row previously was at. It may not be a valid location anymore.

windows: Does not state anything in the documentation but does keep
         track of its own row count internally.
This commit is contained in:
Angelo Haller 2020-09-20 18:21:31 -05:00
parent 3f42463bf4
commit 7336dce8c8
1 changed files with 7 additions and 6 deletions

13
ui.h
View File

@ -1339,12 +1339,13 @@ _UI_EXTERN void uiTableModelRowInserted(uiTableModel *m, int newIndex);
// this if your data changes at some other point. // this if your data changes at some other point.
_UI_EXTERN void uiTableModelRowChanged(uiTableModel *m, int index); _UI_EXTERN void uiTableModelRowChanged(uiTableModel *m, int index);
// uiTableModelRowDeleted() tells any uiTable associated with m // uiTableModelRowDeleted() tells all uiTables associated with
// that the row at index index has been deleted. You call this // the uiTableModel m that the row at index oldIndex has been
// function when the number of rows in your model has changed; // deleted.
// after calling it, NumRows() should returm the new row // You must delete the row from your model before you call this
// count. // function.
// TODO for this and Inserted: make sure the "after" part is right; clarify if it's after returning or after calling // NumRows() must represent the new row count before you call
// this function.
_UI_EXTERN void uiTableModelRowDeleted(uiTableModel *m, int oldIndex); _UI_EXTERN void uiTableModelRowDeleted(uiTableModel *m, int oldIndex);
// TODO reordering/moving // TODO reordering/moving