Repair saved locking logic.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21090

(cherry picked from commit e6d94d5b09)
This commit is contained in:
Jeff Young
2025-06-10 08:44:49 +01:00
parent 9100f22d68
commit 2cb0771d42
2 changed files with 9 additions and 3 deletions
@@ -60,11 +60,17 @@ void DIALOG_LOCKED_ITEMS_QUERY::onOverrideLocks( wxCommandEvent& event )
int DIALOG_LOCKED_ITEMS_QUERY::ShowModal()
{
static int doNotShowValue = wxID_ANY;
if( doNotShowValue != wxID_ANY && m_lockingOptions.m_sessionSkipPrompts )
return doNotShowValue;
int ret = DIALOG_SHIM::ShowModal();
// Has the user asked not to show the dialog again this session?
if( m_doNotShowBtn->IsChecked() && ret != wxID_CANCEL )
{
doNotShowValue = ret;
m_lockingOptions.m_sessionSkipPrompts = true;
}
+3 -3
View File
@@ -742,10 +742,10 @@ PCB_SELECTION& PCB_SELECTION_TOOL::RequestSelection( CLIENT_SELECTION_FILTER aCl
}
PCBNEW_SETTINGS* settings = m_frame->GetPcbNewSettings();
if( !lockedItems.empty() && !settings->m_LockingOptions.m_sessionSkipPrompts )
if( !lockedItems.empty() )
{
DIALOG_LOCKED_ITEMS_QUERY dlg( frame(), lockedItems.size(),
settings->m_LockingOptions );
DIALOG_LOCKED_ITEMS_QUERY dlg( frame(), lockedItems.size(), settings->m_LockingOptions );
switch( dlg.ShowModal() )
{