Showing the changes to interface/src/LocationBookmarks.cpp (1 of 7 files). Show all
Unified · Split
| @@ -74,10 +74,10 @@ void LocationBookmarks::teleportToBookmark() { · 73 unmodified lines | ||
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | void LocationBookmarks::addBookmark() { |
| 77 | − auto offscreenUi = DependencyManager::get<OffscreenUi>(); | |
| 78 | − connect(offscreenUi.data(), &OffscreenUi::inputDialogResponse, this, [=] (QVariant response) { | |
| 79 | − disconnect(offscreenUi.data(), &OffscreenUi::inputDialogResponse, this, nullptr); | |
| 80 | − auto offscreenUi = DependencyManager::get<OffscreenUi>(); | |
| 77 | + ModalDialogListener* dlg = OffscreenUi::getTextAsync(OffscreenUi::ICON_PLACEMARK, "Bookmark Location", "Name", QString()); | |
| 78 | + | |
| 79 | + connect(dlg, &ModalDialogListener::response, this, [=] (QVariant response) { | |
| 80 | + disconnect(dlg, &ModalDialogListener::response, this, nullptr); | |
| 81 | 81 | auto bookmarkName = response.toString(); |
| 82 | 82 | |
| 83 | 83 | bookmarkName = bookmarkName.trimmed().replace(QRegExp("(\r\n|[\r\n\t\v ])+"), " "); |
| @@ -89,8 +89,6 @@ void LocationBookmarks::addBookmark() { · 5 unmodified lines | ||
| 89 | 89 | QString bookmarkAddress = addressManager->currentAddress().toString(); |
| 90 | 90 | Bookmarks::addBookmarkToFile(bookmarkName, bookmarkAddress); |
| 91 | 91 | }); |
| 92 | − | |
| 93 | − OffscreenUi::getTextAsync(OffscreenUi::ICON_PLACEMARK, "Bookmark Location", "Name", QString()); | |
| 94 | 92 | } |
| 95 | 93 | |
| 96 | 94 | void LocationBookmarks::addBookmarkToMenu(Menu* menubar, const QString& name, const QVariant& address) { |