mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
TabbedComponent::removeTab fix.
This commit is contained in:
parent
82d305a2a2
commit
a0e292bdaf
1 changed files with 3 additions and 2 deletions
|
|
@ -271,12 +271,13 @@ void TabbedButtonBar::setTabName (const int tabIndex, const String& newName)
|
|||
|
||||
void TabbedButtonBar::removeTab (const int tabIndex)
|
||||
{
|
||||
const int oldIndex = currentTabIndex;
|
||||
if (tabIndex == currentTabIndex)
|
||||
setCurrentTabIndex (-1);
|
||||
|
||||
TabInfo* const currentTab = tabs [currentTabIndex];
|
||||
tabs.remove (tabIndex);
|
||||
currentTabIndex = tabs.indexOf (currentTab);
|
||||
|
||||
setCurrentTabIndex (oldIndex);
|
||||
resized();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue