hello, I have a dataviectrl with its dataviewctrlmodel. The dataviewctrlmodel has a data member (a list of tuples) containing the data to show up, as the self.data in the DVC_DataViewModel in the demo. If I programmatically swap two tuples in the data variable, how can I see the items swapped in dataviewctrl? A call to Refresh retrieves values from the changed model.data but on screen the order of items remains the same. Is there some other action to add?
thanks in advance for hints
I’ve attached a modified version of demo script as example. Select a song from the tree and click on shift down button: nothing happens on screen for the selected song and the ones that follows but the songs should be swapped in the model
DVC_DataViewModel.py (12.3 KB)
solved using dvc.GetModel().Cleared()
···
On Sunday, October 29, 2017 at 12:43:40 PM UTC+1, Marco Prosperi wrote:
I’ve attached a modified version of demo script as example. Select a song from the tree and click on shift down button: nothing happens on screen for the selected song and the ones that follows but the songs should be swapped in the model