From 76b1990ac51c48fd3d2424d3a65b2a16a2663a5c Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 24 Aug 2007 14:36:08 +0000 Subject: [PATCH] whoops, fix flag * --- pandatool/src/egg-optchar/eggOptchar.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pandatool/src/egg-optchar/eggOptchar.cxx b/pandatool/src/egg-optchar/eggOptchar.cxx index 0bd8f177f2..e1fa7ada95 100644 --- a/pandatool/src/egg-optchar/eggOptchar.cxx +++ b/pandatool/src/egg-optchar/eggOptchar.cxx @@ -453,8 +453,8 @@ dispatch_flag_groups(const string &opt, const string &arg, void *var) { } else { // If there's no equal sign, the default is to name all groups - // after the last word. - entry._name = last_word; + // after the group itself. We leave the name empty to indicate + // that. } // Convert the words to GlobPatterns. @@ -1301,7 +1301,11 @@ do_flag_groups(EggGroupNode *egg_group) { ++si) { if ((*si).matches(egg_group->get_name())) { matched = true; - name = entry._name; + if (!entry._name.empty()) { + name = entry._name; + } else { + name = egg_group->get_name(); + } } } }