Ticket #34: TreeView.d.patch

File TreeView.d.patch, 492 bytes (added by potyl, 4 months ago)

Patch that returns null when there's no selection

  • src/gtk/TreeView.d

    old new  
    232232     */ 
    233233    TreeIter getSelectedIter() 
    234234    { 
    235         TreeIter iter = null
     235        TreeIter iter = new TreeIter()
    236236        TreeSelection selection = getSelection(); 
    237237        TreeModel model = getModel(); 
    238238        TreePath[] paths = selection.getSelectedRows(model); 
    239239        if ( paths.length > 0 ) 
    240240        { 
    241             iter = new TreeIter(); 
    242241            model.getIter(iter,paths[0]); 
    243242        } 
    244243        return iter;