Author Topic: Control-W bug  (Read 4426 times)

Offline chameleon

  • Multiple posting newcomer
  • *
  • Posts: 40
Control-W bug
« on: February 20, 2007, 02:24:32 pm »
I redefine an action for Control-W : Debug->Debugging Windows->Watches.

In menus, looks like redefination is done (Control-W applies to "Watches" and nothing applies to "Close File")

But when I press Control-W, makes current file to close.

Maybe a forgotten (hard) key definition?

Windows, almost last build.

PS: I renege my promise not to post another post ;-)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2873
Re: Control-W bug
« Reply #1 on: February 22, 2007, 03:17:53 pm »
Yes, Ctrl-W is hard coded in main.cpp as "Close Window" and cannot be over-ridden by a plugin.


Code
 // Accelerator table
 wxAcceleratorEntry entries[7];

 entries[0].Set(wxACCEL_CTRL | wxACCEL_SHIFT, (int) 'W', idFileCloseAll);
 entries[1].Set(wxACCEL_CTRL | wxACCEL_SHIFT, WXK_F4, idFileCloseAll);
 entries[2].Set(wxACCEL_CTRL, (int) 'W', idFileClose);
 entries[3].Set(wxACCEL_CTRL, WXK_F4, idFileClose);
 entries[4].Set(wxACCEL_CTRL, WXK_F6, idFileNext);
 entries[5].Set(wxACCEL_CTRL | wxACCEL_SHIFT, WXK_F6, idFilePrev);
 entries[6].Set(wxACCEL_SHIFT, WXK_TAB, idShiftTab);
 m_pAccel = new wxAcceleratorTable(7, entries);

 this->SetAcceleratorTable(*m_pAccel);

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2873
Re: Control-W bug
« Reply #2 on: February 24, 2007, 12:42:12 am »
Fixed SVN 3639