| 104 | } |
| 105 | |
| 106 | bool LayerAnnotatorBase::annotateWithFileDialog(LayerDataBase& layer, LogWindow& log, const String& current_path) const |
| 107 | { |
| 108 | // warn if hidden layer => wrong layer selected... |
| 109 | if (!layer.visible) |
| 110 | { |
| 111 | log.appendNewHeader(LogWindow::LogState::NOTICE, "The current layer is not visible", "Have you selected the right layer for this action? Aborting."); |
| 112 | return false; |
| 113 | } |
| 114 | |
| 115 | // load id data |
| 116 | QString fname = QFileDialog::getOpenFileName(nullptr, |
| 117 | file_dialog_text_.toQString(), |
| 118 | current_path.toQString(), |
| 119 | supported_types_.toFileDialogFilter(FilterLayout::BOTH, true).toQString()); |
| 120 | |
| 121 | bool success = annotateWithFilename(layer, log, fname); |
| 122 | |
| 123 | return success; |
| 124 | } |
| 125 | |
| 126 | bool LayerAnnotatorBase::annotateWithFilename(LayerDataBase& layer, LogWindow& log, const String& fname) const |
| 127 | { |
no test coverage detected