You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following CME, pressing on the Show tabs button, select one tab (say #2), close dialog and then pressing Show tabs buttons
shows that the current tab is the first, not the one previously selected.
Any idea?
Regards
from traits.api import *
from traitsui.api import *
class Tab(HasTraits):
name = String
class Tabs(HasTraits):
current_tab = Instance(Tab)
tabs_list = List(Instance(Tab))
view = View(Group(UCustom('tabs_list',
# springy=True,
# width=300, # width value is arbitrary but required
editor=ListEditor(use_notebook=True,
dock_style='tab',
selected='current_tab',
page_name='.name'))),
kind='subpanel',
buttons=['Undo', 'OK', 'Cancel', 'Help'])
view.close_result = False
def _current_tab_default(self):
return (self.tabs_list[0])
def _tabs_list_default(self):
tabs_list = []
for i in range(3):
tab = Tab(name='tab #%d' % (i+1))
tabs_list.append(tab)
return (tabs_list)
In the following CME, pressing on the Show tabs button, select one tab (say #2), close dialog and then pressing Show tabs buttons
shows that the current tab is the first, not the one previously selected.
Any idea?
Regards
from traits.api import *
from traitsui.api import *
class Tab(HasTraits):
class Tabs(HasTraits):
class Foo(HasTraits):
foo = Foo()
if name == 'main':
foo.configure_traits()
Debian x86_64, Python 3.9.2, ETS source from git, PyQt 5.15.2
The text was updated successfully, but these errors were encountered: