From 1cf112a342cb30b8e3ce2017e6be2702c68c6bd9 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 15 Jan 2025 09:36:36 +0100 Subject: [PATCH] Fix "Show buttons on inactive tabs" option inconsistent behaviour Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16059#issuecomment-2589933587 --- PowerEditor/src/WinControls/Preference/preference.rc | 6 +++--- PowerEditor/src/WinControls/Preference/preferenceDlg.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/PowerEditor/src/WinControls/Preference/preference.rc b/PowerEditor/src/WinControls/Preference/preference.rc index 1a7e73dd8..f282cfd60 100644 --- a/PowerEditor/src/WinControls/Preference/preference.rc +++ b/PowerEditor/src/WinControls/Preference/preference.rc @@ -67,9 +67,9 @@ BEGIN CONTROL "Draw a coloured bar on active tab",IDC_CHECK_ORANGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,241,106,164,10 CONTROL "Show close button",IDC_CHECK_ENABLETABCLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,241,119,164,10 CONTROL "Enable pin tab feature",IDC_CHECK_ENABLETABPIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,241,132,164,10 - CONTROL "Show buttons on inactive tabs",IDC_CHECK_INACTTABDRAWBUTTON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,241,144,164,10 - CONTROL "Double click to close document",IDC_CHECK_DBCLICK2CLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,241,157,164,10 - CONTROL "Exit on close the last tab",IDC_CHECK_TAB_LAST_EXIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,241,170,164,10 + CONTROL "Show buttons on inactive tabs",IDC_CHECK_INACTTABDRAWBUTTON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,241,145,164,10 + CONTROL "Double click to close document",IDC_CHECK_DBCLICK2CLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,241,158,164,10 + CONTROL "Exit on close the last tab",IDC_CHECK_TAB_LAST_EXIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,241,171,164,10 END IDD_PREFERENCE_SUB_EDITING DIALOGEX 115, 10, 460, 205 diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index 93f8f0bfe..9c62b7005 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -795,6 +795,7 @@ intptr_t CALLBACK GeneralSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM { nppParam.getNppGUI()._tabStatus &= ~TAB_INACTIVETABSHOWBUTTON; ::SendDlgItemMessage(_hSelf, IDC_CHECK_INACTTABDRAWBUTTON, BM_SETCHECK, FALSE, 0); + ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_DRAWINACTIVETABBARBUTTON, 0, 0); } ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_INACTTABDRAWBUTTON), showCloseButton || enablePinButton);