summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r--src/timeline/TimelineModel.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index e03c32a7..00f6d9df 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -1534,11 +1534,25 @@ void
 TimelineModel::showEvent(QString eventId)
 {
         using namespace std::chrono_literals;
-        if (idToIndex(eventId) != -1) {
+        // Direct to eventId
+        if (eventId[0] == '$') {
+                int idx = idToIndex(eventId);
+                if (idx == -1) {
+                        nhlog::ui()->warn("Scrolling to event id {}, failed - no known index",
+                                          eventId.toStdString());
+                        return;
+                }
                 eventIdToShow = eventId;
                 emit scrollTargetChanged();
                 showEventTimer.start(50ms);
+                return;
         }
+        // to message index
+        eventId       = indexToId(eventId.toInt());
+        eventIdToShow = eventId;
+        emit scrollTargetChanged();
+        showEventTimer.start(50ms);
+        return;
 }
 
 void