Project

General

Profile

Actions

Bug #4750

open
MF

WTabWidget::setTabEnabled behavior changed

Bug #4750: WTabWidget::setTabEnabled behavior changed

Added by Manfred Fuchs over 10 years ago. Updated over 10 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
02/17/2016
Due date:
% Done:

0%

Estimated time:

Description

In Wt-3.3.5 WTabWidget::setTabEnabled behavior changed
There is an automatic Tab switch, if a Tab is disabled.
Example:
if currentIndex = 2 and then the index 3 is disabled, the currentIndex is changed to 4.

void WTabWidget::setTabEnabled(int index, bool enable)
{
menu_->setItemDisabled(index, !enable);
}

void WMenuItem::setDisabled(bool disabled)
{
WContainerWidget::setDisabled(disabled);

if (disabled)
if (menu_)
menu_onItemHidden(menu_>indexOf(this), true);
}

void WMenu::onItemHidden(int index, bool hidden)
{
if (hidden) {
int nextItem = nextAfterHide(index);
if (nextItem != current_)
select(nextItem);
}
}

KD Updated by Koen Deforche over 10 years ago Actions #1

  • Status changed from New to Feedback

Hey, yes this was intentional. A 'disabled' tab cannot be selected, so we shouldn't allow it to be selected?

MF Updated by Manfred Fuchs over 10 years ago Actions #2

No Bug

My function disabeld all tabs, and then enabled one tab. (works with WT 3.3.4)
I changed to "disable all tabs exept the active one".

Actions

Also available in: PDF Atom