MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / OnUpdateOpenLogFile

Method OnUpdateOpenLogFile

lib/mdflib/mdfviewer/src/mdfviewer.cpp:162–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void MdfViewer::OnUpdateOpenLogFile(wxUpdateUIEvent &event) {
163 if (notepad_.empty()) {
164 event.Enable(false);
165 return;
166 }
167
168 auto& log_config = LogConfig::Instance();
169 std::string logfile = log_config.GetLogFile();
170 try {
171 std::filesystem::path p(logfile);
172 const bool exist = std::filesystem::exists(p);
173 event.Enable(exist);
174 } catch (const std::exception&) {
175 event.Enable(false);
176 }
177}
178
179void MdfViewer::OnGnuPlotDownloadPage(wxCommandEvent& event) {
180 wxLaunchDefaultBrowser("http://www.gnuplot.info/",

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.80
GetLogFileMethod · 0.80

Tested by

no test coverage detected