From: Duncan C. <dun...@wo...> - 2006-12-24 01:18:02
|
Sat Dec 23 17:06:24 PST 2006 Duncan Coutts <du...@co...> * Add treeStoreClear hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 48 + treeStoreClear, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs 503 +treeStoreClear :: TreeStore a -> IO () +treeStoreClear (TreeStore model) = do + customTreeModelInvalidateIters model + Store { content = cache } <- readIORef (customTreeModelGetPrivate model) + let forest = cacheToStore cache + writeIORef (customTreeModelGetPrivate model) Store { + depth = calcForestDepth [], + content = storeToCache [] + } + let loop (-1) = return () + loop n = treeModelRowDeleted model [n] >> loop (n-1) + loop (length forest - 1) + |