| 231 | } |
| 232 | |
| 233 | void onAction(const event::Action&) override |
| 234 | { |
| 235 | TextEditorModule* const module = this->module;; |
| 236 | WeakPtr<ImGuiTextEditor> widget = this->widget; |
| 237 | |
| 238 | async_dialog_filebrowser(false, nullptr, nullptr, text.c_str(), [module, widget](char* path) |
| 239 | { |
| 240 | if (path) |
| 241 | { |
| 242 | if (module->loadFileFromMenuAction(path)) |
| 243 | { |
| 244 | if (widget) |
| 245 | widget->setFileWithKnownText(module->file, module->text); |
| 246 | } |
| 247 | free(path); |
| 248 | } |
| 249 | }); |
| 250 | } |
| 251 | }; |
| 252 | |
| 253 | // -------------------------------------------------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected