feat: disable tab renaming on double-click via setting (#6163)
Fixes #6156
This commit is contained in:
@@ -326,6 +326,11 @@ public:
|
||||
BoolSetting mentionUsersWithComma = {"/behaviour/mentionUsersWithComma",
|
||||
true};
|
||||
|
||||
BoolSetting disableTabRenamingOnClick = {
|
||||
"/behaviour/disableTabRenamingOnClick",
|
||||
false,
|
||||
};
|
||||
|
||||
/// Emotes
|
||||
BoolSetting scaleEmotesByLineHeight = {"/emotes/scaleEmotesByLineHeight",
|
||||
false};
|
||||
|
||||
@@ -958,8 +958,10 @@ void NotebookTab::mouseReleaseEvent(QMouseEvent *event)
|
||||
|
||||
void NotebookTab::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton &&
|
||||
this->notebook_->getAllowUserTabManagement())
|
||||
const auto canRenameTab = this->notebook_->getAllowUserTabManagement() &&
|
||||
getSettings()->disableTabRenamingOnClick == false;
|
||||
|
||||
if (event->button() == Qt::LeftButton && canRenameTab)
|
||||
{
|
||||
this->showRenameDialog();
|
||||
}
|
||||
|
||||
@@ -1369,6 +1369,9 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
||||
"Enable experimental Twitch EventSub support (requires restart)",
|
||||
s.enableExperimentalEventSub);
|
||||
|
||||
layout.addCheckbox("Disable renaming of tabs on double-click",
|
||||
s.disableTabRenamingOnClick);
|
||||
|
||||
layout.addStretch();
|
||||
|
||||
// invisible element for width
|
||||
|
||||
Reference in New Issue
Block a user