From: caballero Date: Mon, 30 Mar 2009 13:21:48 +0000 (+0000) Subject: Fixed popup position when enlarging. X-Git-Tag: EED.02Oct2009~128 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d38ff4802df421152298211fc44eb5f20b7a5dec;p=creaImageIO.git Fixed popup position when enlarging. --- diff --git a/src2/creaImageIOWxTreeView.cpp b/src2/creaImageIOWxTreeView.cpp index d0a1402..852107b 100644 --- a/src2/creaImageIOWxTreeView.cpp +++ b/src2/creaImageIOWxTreeView.cpp @@ -422,10 +422,6 @@ namespace creaImageIO GimmickDebugMessage(1, " Level "<GetColumnWidth(mColumnSelected)); + for(int i=0;iGetColumnWidth(i); + } for(int i=0;iGetSashPosition(); @@ -733,68 +732,7 @@ namespace creaImageIO } } - //================================================================ - void WxTreeView::OnBeginLabelEdit(wxListEvent& event) - { - GimmickDebugMessage(7, - "WxTreeView::OnBeginLabelEdit" - <GetNextItem(it, - wxLIST_NEXT_ALL); - if ( it == -1 ) - break; - if(it!=0) - { - long adr = GetCtrl(level)->GetItemData(it); - for (int j=1;jGetColumnCount()-1&&!contains;j++) - { - tree::Node* nod = ((ItemData*)adr)->node; - att=(*nod).GetAttribute(mLevelList[level].key[j-1]); - - if(att.find(filter)<900) - { - contains=true; - } - } - if(!contains) - { - GetCtrl(level)->DeleteItem(it); - } - } - } - GetGimmickView()->ClearSelection(); - //GetCtrl(level)->DeleteAllItems(); - - } + //================================================================ void WxTreeView::ValidateSelectedImages(bool isSelection) { @@ -1008,10 +946,10 @@ END_EVENT_TABLE() BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl) EVT_LIST_BEGIN_DRAG(LIST_CTRL, MyListCtrl::OnBeginDrag) EVT_LIST_BEGIN_RDRAG(LIST_CTRL, MyListCtrl::OnBeginRDrag) - */ + EVT_LIST_BEGIN_LABEL_EDIT(-1, WxTreeView::OnBeginLabelEdit) EVT_LIST_END_LABEL_EDIT(-1, WxTreeView::OnEndLabelEdit) - /* + EVT_LIST_DELETE_ITEM(LIST_CTRL, MyListCtrl::OnDeleteItem) EVT_LIST_DELETE_ALL_ITEMS(LIST_CTRL, MyListCtrl::OnDeleteAllItems) #if WXWIN_COMPATIBILITY_2_4 diff --git a/src2/creaImageIOWxTreeView.h b/src2/creaImageIOWxTreeView.h index dbd0162..3e6c106 100644 --- a/src2/creaImageIOWxTreeView.h +++ b/src2/creaImageIOWxTreeView.h @@ -42,12 +42,6 @@ namespace creaImageIO /// Callback for column click void OnColClick(wxListEvent& event); - /// Callback for first item edition - void OnBeginLabelEdit(wxListEvent& event); - - /// Callback when first item edition ends - void OnEndLabelEdit(wxListEvent& event); - /// Callback when the user needs the items sorted void OnPopupSort(wxCommandEvent& event);