MCPcopy Create free account
hub / github.com/MyGUI/mygui / notifyEndDialog

Method notifyEndDialog

UnitTests/UnitTest_GraphView/DemoKeeper.cpp:280–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278 }
279
280 void DemoKeeper::notifyEndDialog(tools::Dialog* _dialog, bool _result)
281 {
282 if (_result)
283 {
284 if (mFileDialogSave)
285 {
286 std::string filename = mFileDialog->getFileName();
287 size_t index = filename.find_first_of('.');
288 if (index == std::string::npos)
289 filename += ".xml";
290 filename = mFileDialog->getCurrentFolder() + "/" + filename;
291
292 saveToFile(filename);
293 }
294 else
295 {
296 ClearGraph();
297
298 std::string filename = mFileDialog->getFileName();
299 filename = mFileDialog->getCurrentFolder() + "/" + filename;
300
301 loadFromFile(filename);
302 }
303 }
304
305 _dialog->endModal();
306 }
307
308 void DemoKeeper::ClearGraph()
309 {

Callers

nothing calls this directly

Calls 2

find_first_ofMethod · 0.80
endModalMethod · 0.45

Tested by

no test coverage detected