Sorry, very messy PR, I broke everything and had to change a lot of the logic to make it work again. Past me made a lot of bad design choices if you as present me.
But now the behavior seems to be what I intended:
When switching directory, MVC (Model View Controller) is not systematically cleared:
the content of the table views (MDAFolderTableView and SelectFieldsTableView) is updated accordingly:
empty table view is nothing to display (using new EmptyTableModel class), instead of clearing everything.
updated content if something to display
the content of the MDAFileVisualization widget remains unchanged, allowing to compare files from different directories; opening an invalid or empty directory by mistake does not clear the graph, just displays empty tables.
only the very first mda file is plotted automatically (when the application is started); subsequent change of folder don't trigger automatic plotting of the first file (#87).
Sorry, very messy PR, I broke everything and had to change a lot of the logic to make it work again. Past me made a lot of bad design choices if you as present me.
But now the behavior seems to be what I intended:
When switching directory,
MVC
(Model View Controller) is not systematically cleared:MDAFolderTableView
andSelectFieldsTableView
) is updated accordingly:EmptyTableModel
class), instead of clearing everything.MDAFileVisualization
widget remains unchanged, allowing to compare files from different directories; opening an invalid or empty directory by mistake does not clear the graph, just displays empty tables.