Closed Kinaou closed 9 years ago
@Kinaou, the changes look good and I only have one question: Why do you use GetIdxFromWindow
for TAB_MIDDLE_DOWN
, but FindTab
for TAB_MIDDLE_UP
?
AuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, GetManagedWindow()->GetId());
e.SetSelection(part->m_tab_container->GetIdxFromWindow(hitPane->GetWindow()));
...
if (FindTab(part->pane->GetWindow(), &ctrl, &ctrlIndex))
wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, GetManagedWindow()->GetId());
Does this mean that when I click on a tab area that doesn't match any tab (like a tab background), I get MIDDLE_DOWN
, but not MIDDLE_UP
event (as the second one is conditioned on the tab match and the first one is not)? If so, we may use the same check for all these events.
You are right, I have not thought about this case. The tab's related events are not relevant when the tabs bar's background is sought. I'll fix that.
@nhold, you merged 6a96e92 but not 59f4453, is it intentional? or is it that I missed something?
No I did, I just cleaned up the commit history a bit. You can see in the commit that the changes are there. I had to manually do it because github couldn't merge it. Sorry about any confusion.
Checked and modified the
wxAuiNotebookEvent
object's content sent by the frame manager to be consistent with the behavior of the 'old aui':wxAuiTabContainer
as event object when expected (most of the time excepted for some dnd events)wxEVT_AUINOTEBOOK_CANCEL_DRAG
event (should ease catching the event anew in the wxAuiNotebook::OnTabCancelDrag - see issue https://github.com/nhold/wxWidgets/issues/108)This patch should answer to the issue https://github.com/nhold/wxWidgets/issues/111