Lars Gullik Bjønnes wrote: > Any particualr reason not to just clear it? > > // Make sure that we are clean > packages_.clear();
Currently, getAvailable is called from two places: (1) LaTeXFeatures::isAvailable if (packages_.empty()) getAvailable(); (when LyX checks the existence of a package while running). and (2) lyx_cb.C, Reconfigure getAvailable(); (after Reconfigure, without the need of restarting LyX). while in case (1) it is not necessary to clear the list (because it is already empty) it is necessary in (2). That's the reason why I added the check (to avoid redundant clearing in case 1, which is the more common one). Jürgen