diff --git a/common/dialogs/dialog_locked_items_query.cpp b/common/dialogs/dialog_locked_items_query.cpp index a96129e354..5cb2cd3ace 100644 --- a/common/dialogs/dialog_locked_items_query.cpp +++ b/common/dialogs/dialog_locked_items_query.cpp @@ -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; } diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index 890fa496a1..a14b13b74b 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -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() ) {