Skip to content

Saving: file type not selectable #160

@walachey

Description

@walachey

When I save a file, I cannot select the file type (in the "Save as.."-dialog). When I manually enter e.g. "foo.json" it saves as "foo.json.csv". When I enter "foo.csv", it saves as "foo.csv.csv".

I can change the filetype in the settings. Then I have to restart the BT for the change to take effect.

Apparently, the ENUMS::CONTROLLERTYPE::DATAEXPORT is persistent with a fixed model (either csv or json writer). So when ControllerDataExporter::saveFile is called, it just saves the file with whatever model is currently set. Same problem is probably for loading.

This is super counter-intuitive. Should the controller set its own model on save/load depending on the file type? Or should the MainWindowController change the other model? Why is the ControllerDataExport persistent anyway?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions