MCPcopy Create free account
hub / github.com/VCVRack/Rack / saveDialog

Method saveDialog

src/patch.cpp:142–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140
141
142void Manager::saveDialog() {
143 if (path == "") {
144 saveAsDialog();
145 return;
146 }
147
148 // Note: If save() fails below, this should probably be reset. But we need it so toJson() doesn't set the "unsaved" property.
149 APP->history->setSaved();
150
151 try {
152 save(path);
153 }
154 catch (Exception& e) {
155 std::string message = string::f(string::translate("patch.saveFailed"), e.what());
156 osdialog_message(OSDIALOG_INFO, OSDIALOG_OK, message.c_str());
157 return;
158 }
159}
160
161
162void Manager::saveAsDialog(bool setPath) {

Callers

nothing calls this directly

Calls 5

saveFunction · 0.85
translateFunction · 0.85
setSavedMethod · 0.80
whatMethod · 0.80
fFunction · 0.70

Tested by

no test coverage detected