{
m_fixed_tab_width = 100;
- int tot_width = tab_ctrl_size.x;
+ int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - 4;
if (tab_count > 0)
{
m_fixed_tab_width = tot_width/(int)tab_count;
{
m_fixed_tab_width = 100;
- int tot_width = tab_ctrl_size.x;
+ int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - 4;
if (tab_count > 0)
{
m_fixed_tab_width = tot_width/(int)tab_count;
}
+ // if there are less than two panes, split can't happen, so leave
+ if (m_tabs.GetPageCount() < 2)
+ return;
+
// if tab moving is not allowed, leave
if (!(m_flags & wxAUI_NB_TAB_SPLIT))
- {
return;
- }
if (src_tabs)
// only perform a tab split if it's allowed
- if (m_flags & wxAUI_NB_TAB_SPLIT)
+ if ((m_flags & wxAUI_NB_TAB_SPLIT) && m_tabs.GetPageCount() >= 2)
{
// If the pointer is in an existing tab frame, do a tab insert
wxWindow* hit_wnd = ::wxFindWindowAtPoint(mouse_screen_pt);