Fix for bug #1166231 (GUI: Caret not removed when switching tabs)
svn-id: r17379
This commit is contained in:
parent
d2cdbefc5c
commit
adf9bcf5d1
1 changed files with 4 additions and 2 deletions
|
@ -60,7 +60,7 @@ int TabWidget::addTab(const String &title) {
|
|||
// Add a new tab page
|
||||
Tab newTab;
|
||||
newTab.title = title;
|
||||
newTab.firstWidget = NULL;
|
||||
newTab.firstWidget = 0;
|
||||
|
||||
_tabs.push_back(newTab);
|
||||
|
||||
|
@ -84,8 +84,10 @@ void TabWidget::setActiveTab(int tabID) {
|
|||
assert(0 <= tabID && tabID < (int)_tabs.size());
|
||||
if (_activeTab != tabID) {
|
||||
// Exchange the widget lists, and switch to the new tab
|
||||
if (_activeTab != -1)
|
||||
if (_activeTab != -1) {
|
||||
_tabs[_activeTab].firstWidget = _firstWidget;
|
||||
releaseFocus();
|
||||
}
|
||||
_activeTab = tabID;
|
||||
_firstWidget = _tabs[tabID].firstWidget;
|
||||
_boss->draw();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue