src/Screens/ModelEditorScreen.cpp
// handle what happens when the underlying model file changes
handle what happens when the underlying model file changes
handle what happens when the underlying model file changes
void modelEditorOnBackingFileChanged(ModelEditorScreen::Impl& impl) {
        try {
            log::info("file change detected: loading updated file");
            auto p = std::make_unique<OpenSim::Model>(impl.st->getModel().getInputFileName());
            log::info("loaded updated file");
            impl.st->setModel(std::move(p));
        } catch (std::exception const& ex) {
            log::error("error occurred while trying to automatically load a model file:");
            log::error(ex.what());
            log::error("the file will not be loaded into osc (you won't see the change in the UI)");
        }
    }
void modelEditorOnBackingFileChanged ( ModelEditorScreen :: Impl & impl ) { try { log :: info ( " " ) ; auto p = std :: make_unique < OpenSim :: Model > ( impl . st -> getModel ( ) . getInputFileName ( ) ) ; log :: info ( " " ) ; impl . st -> setModel ( std :: move ( p ) ) ; } catch ( std :: exception const & ex ) { log :: error ( " " ) ; log :: error ( ex . what ( ) ) ; log :: error ( " " ) ; } }
handle what happens when the underlying model file changes
handle what happens when the underlying model file changes