Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcorgan committed Aug 17, 2014
2 parents c84e7f4 + fd2ec0b commit f5cb616
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gr-utils/python/modtool/modtool_makexml.py
Expand Up @@ -137,7 +137,7 @@ def _type_translate(p_type, default_v=None):
'std::vector<float>': 'real_vector',
'std::vector<gr_complex>': 'complex_vector',
}
if p_type in ('int',) and default_v[:2].lower() == '0x':
if p_type in ('int',) and default_v is not None and len(default_v) > 1 and default_v[:2].lower() == '0x':
return 'hex'
try:
return translate_dict[p_type]
Expand Down
4 changes: 2 additions & 2 deletions gr-wxgui/python/wxgui/forms/forms.py
Expand Up @@ -515,13 +515,13 @@ def __init__(self, pages, notebook, **kwargs):
_chooser_base.__init__(self, **kwargs)
assert len(pages) == len(self._choices)
self._notebook = notebook
self._notebook.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self._handle)
self._notebook.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING, self._handle)
#add pages, setting the label on each tab
for i, page in enumerate(pages):
self._notebook.AddPage(page, self._labels[i])
self._add_widget(self._notebook)

def _handle(self, event): self[INT_KEY] = self._notebook.GetSelection()
def _handle(self, event): self[INT_KEY] = event.GetSelection()
# SetSelection triggers a page change event (deprecated, breaks on Windows) and ChangeSelection does not
def _update(self, i): self._notebook.ChangeSelection(i)

Expand Down

0 comments on commit f5cb616

Please sign in to comment.