MCPcopy Create free account
hub / github.com/GollyGang/ready / SavePatternDialog

Method SavePatternDialog

src/gui/frame.cpp:1441–1464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1439// ---------------------------------------------------------------------
1440
1441wxString MyFrame::SavePatternDialog()
1442{
1443 wxString filename = wxEmptyString;
1444 wxString currname = this->system->GetFilename();
1445 currname = currname.AfterLast(wxFILE_SEP_PATH);
1446
1447 wxString extension(this->system->GetFileExtension().c_str(),wxConvUTF8);
1448 wxString extension_description = _("Extended VTK files (*.")+extension +_T(")|*.")+extension;
1449
1450 wxFileDialog savedlg(this, _("Specify the pattern filename"), opensavedir, currname,
1451 extension_description,
1452 wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
1453 #ifdef __WXGTK__
1454 // opensavedir is ignored above (bug in wxGTK 2.8.0???)
1455 savedlg.SetDirectory(opensavedir);
1456 #endif
1457 if(savedlg.ShowModal() == wxID_OK) {
1458 wxFileName fullpath( savedlg.GetPath() );
1459 opensavedir = fullpath.GetPath();
1460 filename = savedlg.GetPath();
1461 }
1462
1463 return filename;
1464}
1465
1466// ---------------------------------------------------------------------
1467

Callers

nothing calls this directly

Calls 2

GetFilenameMethod · 0.80
GetFileExtensionMethod · 0.45

Tested by

no test coverage detected