Project

General

Profile

Bug #4750

WTabWidget::setTabEnabled behavior changed

Added by Manfred Fuchs almost 7 years ago. Updated almost 7 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);

}

}

#1

Updated by Koen Deforche almost 7 years ago

  • 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?

#2

Updated by Manfred Fuchs almost 7 years ago

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".

Also available in: Atom PDF