diff -r 89a9235b47d3 -r ec95fc95e5f3 src/primitives.cpp --- a/src/primitives.cpp Tue Jul 30 07:16:48 2013 +0300 +++ b/src/primitives.cpp Tue Jul 30 07:38:08 2013 +0300 @@ -27,10 +27,10 @@ #include "misc.h" #include "colors.h" -vector g_PrimitiveCategories; +List g_PrimitiveCategories; static PrimitiveLister* g_activePrimLister = null; static bool g_primListerMutex = false; -vector g_primitives; +List g_primitives; static const str g_Other = QObject::tr ("Other"); @@ -71,7 +71,7 @@ // ============================================================================= // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ============================================================================= -static void recursiveGetFilenames (QDir dir, vector& fnames) { +static void recursiveGetFilenames (QDir dir, List& fnames) { QFileInfoList flist = dir.entryInfoList(); for (const QFileInfo & info : flist) { @@ -95,7 +95,7 @@ QDir dir (LDPaths::prims()); ulong baselen = dir.absolutePath().length(); ulong i = 0; - vector fnames; + List fnames; assert (dir.exists()); recursiveGetFilenames (dir, fnames); @@ -183,6 +183,7 @@ for (Primitive& prim : g_primitives) { bool matched = false; + prim.cat = null; // Go over the categories and their regexes, if and when there's a match, // the primitive's category is set to the category the regex beloings to. @@ -291,9 +292,9 @@ // ============================================================================= // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ============================================================================= -vector makePrimitive (PrimitiveType type, int segs, int divs, int num) { - vector objs; - vector condLineSegs; +List makePrimitive (PrimitiveType type, int segs, int divs, int num) { + List objs; + List condLineSegs; for (int i = 0; i < segs; ++i) { double x0 = radialPoint (i, divs, cos),