Only show gestures in List HotKeys (and not in Preferences / HotKeys).
This commit is contained in:
parent
b429dbfb88
commit
3d9690302c
|
@ -140,7 +140,7 @@ void PANEL_HOTKEYS_EDITOR::installButtons( wxSizer* aSizer )
|
|||
|
||||
bool PANEL_HOTKEYS_EDITOR::TransferDataToWindow()
|
||||
{
|
||||
m_hotkeyStore.Init( m_toolManagers );
|
||||
m_hotkeyStore.Init( m_toolManagers, m_readOnly );
|
||||
return m_hotkeyListCtrl->TransferDataToControl();
|
||||
}
|
||||
|
||||
|
@ -150,6 +150,9 @@ bool PANEL_HOTKEYS_EDITOR::TransferDataFromWindow()
|
|||
if( !m_hotkeyListCtrl->TransferDataFromControl() )
|
||||
return false;
|
||||
|
||||
if( m_readOnly )
|
||||
return true;
|
||||
|
||||
// save the hotkeys
|
||||
for( TOOL_MANAGER* toolMgr : m_toolManagers )
|
||||
WriteHotKeyConfig( toolMgr->GetActions() );
|
||||
|
|
|
@ -84,7 +84,7 @@ HOTKEY_STORE::HOTKEY_STORE()
|
|||
}
|
||||
|
||||
|
||||
void HOTKEY_STORE::Init( std::vector<TOOL_MANAGER*> aToolManagerList )
|
||||
void HOTKEY_STORE::Init( std::vector<TOOL_MANAGER*> aToolManagerList, bool aIncludeGestures )
|
||||
{
|
||||
m_toolManagers = std::move( aToolManagerList );
|
||||
|
||||
|
@ -125,12 +125,15 @@ void HOTKEY_STORE::Init( std::vector<TOOL_MANAGER*> aToolManagerList )
|
|||
currentSection->m_HotKeys.emplace_back( HOTKEY( entry.second ) );
|
||||
}
|
||||
|
||||
if( aIncludeGestures )
|
||||
{
|
||||
m_hk_sections.emplace_back( HOTKEY_SECTION() );
|
||||
currentSection = &m_hk_sections.back();
|
||||
currentSection->m_SectionName = _( "Gestures" );
|
||||
|
||||
for( TOOL_ACTION* gesture : g_gesturePseudoActions )
|
||||
currentSection->m_HotKeys.emplace_back( HOTKEY( gesture ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
*/
|
||||
HOTKEY_STORE();
|
||||
|
||||
void Init( std::vector<TOOL_MANAGER*> aToolManagerList );
|
||||
void Init( std::vector<TOOL_MANAGER*> aToolManagerList, bool aIncludeGestures );
|
||||
|
||||
static wxString GetAppName( TOOL_ACTION* aAction );
|
||||
static wxString GetSectionName( TOOL_ACTION* aAction );
|
||||
|
|
Loading…
Reference in New Issue