Opened 4 years ago

Closed 4 years ago

#11783 closed build error (fixed)

compile fix for wxCommandProcessor with --disable-accel

Reported by: alarsen Owned by:
Priority: normal Milestone: 2.9.1
Component: GUI-generic Version: stable-latest
Keywords: wxCommandProcessor wxAcceleratorEntry Cc:
Blocked By: Blocking:
Patch: yes

Description

src/common/cmdproc.cpp doesn't compile when configured with --disable-accel.

This trivial patch fixes the problem (but may have side-effects I haven't noticed):

  • src/common/cmdproc.cpp

    a b wxCommandProcessor::wxCommandProcessor(int maxCommands) 
    6060#if wxUSE_MENUS 
    6161    m_commandEditMenu = NULL; 
    6262#endif // wxUSE_MENUS 
     63 
     64#if wxUSE_ACCEL 
    6365    m_undoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Z').ToString() 
    6466    m_redoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Y').ToString() 
     67#endif // wxUSE_ACCEL 
    6568 
    6669    m_lastSavedCommand = 
    6770    m_currentCommand = wxList::compatibility_iterator(); 

Cheers
Anders

Change History (1)

comment:1 Changed 4 years ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [63614]) Fix wxCommandProcessor compilation with wxUSE_ACCEL==0.

Leave the accelerator strings empty in this case.

Closes #11783.

Note: See TracTickets for help on using tickets.