Repair saved locking logic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21090
(cherry picked from commit e6d94d5b09)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user