Ticket #9975: 0001-TabView-BTab-Select-only-add-child-if-it-doesn-t-hav.patch

File 0001-TabView-BTab-Select-only-add-child-if-it-doesn-t-hav.patch, 813 bytes (added by gbonvehi, 6 years ago)

Fix Select trying to re-add a childtext/html

  • src/kits/interface/TabView.cpp

    From d2f31702dc8b80c1e6f81d67ce5632385184f803 Mon Sep 17 00:00:00 2001
    From: Guillermo Bonvehi <gbonvehi@gmail.com>
    Date: Fri, 10 Jan 2014 03:01:40 +0000
    Subject: [PATCH] TabView BTab::Select only add child if it doesn't have a
     parent
    
    ---
     src/kits/interface/TabView.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/kits/interface/TabView.cpp b/src/kits/interface/TabView.cpp
    index 452314c..e22e633 100644
    a b BTab::Select(BView *owner) 
    151151
    152152    // NOTE: Views are not added/removed, if there is layout,
    153153    // they are made visible/invisible in that case.
    154     if (!owner->GetLayout())
     154    if (!owner->GetLayout() && View()->Parent() == NULL)
    155155        owner->AddChild(fView);
    156156
    157157    fSelected = true;