Patch level : 10.0
Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Risolto Errore 000826 Corretta gestione notifiche di cancellamento il librerira di gestione alberi git-svn-id: svn://10.65.10.50/trunk@16899 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a09719fae2
commit
be9a863efa
@ -860,7 +860,7 @@ XVT_TREEVIEW_NODE xvt_treeview_get_child_node(WINDOW win, XVT_TREEVIEW_NODE pare
|
||||
if (!parent.IsOk())
|
||||
parent = tv.GetRootItem();
|
||||
|
||||
if (position < (int)tv.GetChildrenCount(parent))
|
||||
if (parent.IsOk() && position < (int)tv.GetChildrenCount(parent))
|
||||
{
|
||||
wxTreeItemIdValue cookie;
|
||||
wxTreeItemId id;
|
||||
@ -940,7 +940,14 @@ BOOLEAN xvt_treeview_remove_child_node(WINDOW win, XVT_TREEVIEW_NODE node)
|
||||
{
|
||||
CAST_TREEVIEW(win, tv);
|
||||
const wxTreeItemId id(node);
|
||||
tv.Delete(id);
|
||||
if (id == tv.GetRootItem())
|
||||
tv.DeleteAllItems();
|
||||
else
|
||||
{
|
||||
tv.Suspend();
|
||||
tv.Delete(id);
|
||||
tv.Resume();
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
@ -951,10 +958,12 @@ BOOLEAN xvt_treeview_remove_node_children(WINDOW win, XVT_TREEVIEW_NODE node)
|
||||
if (win != NULL_WIN)
|
||||
{
|
||||
CAST_TREEVIEW(win, tv);
|
||||
tv.Suspend();
|
||||
wxTreeItemId id(node);
|
||||
if (!id.IsOk())
|
||||
if (!id.IsOk())
|
||||
id = tv.GetRootItem();
|
||||
tv.DeleteChildren(id);
|
||||
tv.Resume();
|
||||
ok = TRUE;
|
||||
}
|
||||
return ok;
|
||||
|
@ -938,10 +938,15 @@ TwxWindow::TwxWindow(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||
|
||||
TwxWindow::~TwxWindow()
|
||||
{
|
||||
_nice_windows.Delete((WINDOW)this);
|
||||
|
||||
EVENT e; memset(&e, 0, sizeof(EVENT));
|
||||
e.type = E_DESTROY;
|
||||
DoXvtEvent(e);
|
||||
|
||||
// Rendo praticamente impossibile risalire a questo oggetto d'ora in poi
|
||||
_eh = NULL;
|
||||
_app_data = 0L;
|
||||
_nice_windows.Delete((WINDOW)this);
|
||||
|
||||
if (HasCapture())
|
||||
{
|
||||
@ -1124,12 +1129,12 @@ TTaskWin::TTaskWin(wxWindowID id, const wxString& title,
|
||||
|
||||
TTaskWin::~TTaskWin()
|
||||
{
|
||||
_nice_windows.Delete((WINDOW)this);
|
||||
if (m_menu)
|
||||
{
|
||||
xvt_res_free_menu_tree(m_menu);
|
||||
m_menu = NULL;
|
||||
}
|
||||
_nice_windows.Delete((WINDOW)this);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user