freebsd-ports/biology/treeviewx/files/patch-fix-load-trees
Baptiste Daroussin 2afa67184c Update to 0.5.1 snapshot 20100824
For the story when moved to google code the project released a version 0.5 which was newer than the 0.5.1 from earlier hosting
To be consistent named it 0.5.1s20100824 (following what debian did)
Switch treeviewx to use unicode version of wx
Add a patch from Ubuntu to fix loading trees.
2014-06-03 14:51:29 +00:00

40 lines
932 B
Text

Bug: http://code.google.com/p/treeviewx/issues/detail?id=1
Description: fix crash on loading tree file.
Author: Tim Booth
--- tview.cpp
+++ tview.cpp
@@ -278,7 +278,7 @@
char buf[256];
strcpy (buf, p->GetLabel().c_str());
wchar_t wbuf[256];
- mbstowcs (wbuf, buf, size_t(wbuf));
+ mbstowcs (wbuf, buf, 256);
s << wbuf;
#else
s << p->GetLabel().c_str();
@@ -563,7 +563,7 @@
char buf[256];
strcpy (buf, t.GetName().c_str());
wchar_t wbuf[256];
- mbstowcs (wbuf, buf, size_t(wbuf));
+ mbstowcs (wbuf, buf, 256);
txt << wbuf;
#else
txt << t.GetName().c_str();
@@ -712,7 +712,7 @@
char buf[256];
strcpy (buf, p.GetIthTreeName(i).c_str());
wchar_t wbuf[256];
- mbstowcs (wbuf, buf, size_t(wbuf));
+ mbstowcs (wbuf, buf, 256);
std::wstring tname = wbuf;
@@ -1046,6 +1046,7 @@
void MyCanvas::OnSize(wxSizeEvent& event)
{
Resize ();
+ Refresh();
event.Skip();
}