diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp index 3c77823cf6..dab33ac744 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp @@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "boxes/sticker_set_box.h" #include "ui/boxes/confirm_box.h" #include "base/platform/base_platform_info.h" +#include "base/qt/qt_key_modifiers.h" #include "base/unixtime.h" #include "mainwindow.h" #include "mainwidget.h" @@ -1729,6 +1730,9 @@ void InnerWidget::updateSelected() { } else { selectingText = false; } + if (base::IsAltPressed()) { + request.flags &= ~Ui::Text::StateRequest::Flag::LookupLink; + } dragState = view->textState(itemPoint, request); lnkhost = view; if (!dragState.link && itemPoint.x() >= st::historyPhotoLeft && itemPoint.x() < st::historyPhotoLeft + st::msgPhotoSize) { diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 8b94a53ea2..980b0b43a3 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -51,6 +51,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "history/history_widget.h" #include "base/platform/base_platform_info.h" #include "base/qt/qt_common_adapters.h" +#include "base/qt/qt_key_modifiers.h" #include "base/unixtime.h" #include "mainwindow.h" #include "layout/layout_selection.h" @@ -3352,6 +3353,9 @@ void HistoryInner::mouseActionUpdate() { } else { selectingText = false; } + if (base::IsAltPressed()) { + request.flags &= ~Ui::Text::StateRequest::Flag::LookupLink; + } dragState = view->textState(m, request); _dragStateItem = session().data().message(dragState.itemId); lnkhost = view; diff --git a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp index e7e6fbf9ca..78248f9f88 100644 --- a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp @@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "history/view/history_view_list_widget.h" #include "base/unixtime.h" +#include "base/qt/qt_key_modifiers.h" #include "history/history_message.h" #include "history/history_item_components.h" #include "history/history_item_text.h" @@ -2664,6 +2665,9 @@ void ListWidget::mouseActionUpdate() { } else { inTextSelection = false; } + if (base::IsAltPressed()) { + request.flags &= ~Ui::Text::StateRequest::Flag::LookupLink; + } const auto dateHeight = st::msgServicePadding.bottom() + st::msgServiceFont->height