From 577bdbea67b613f9cec7eb1baa31f9dce306bf74 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sun, 4 Mar 2012 15:49:28 +0100 Subject: [PATCH] Patch #2 in Issue 1110 --- waflib/extras/msvs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/waflib/extras/msvs.py b/waflib/extras/msvs.py index 0ca5b3ca..123c59f0 100644 --- a/waflib/extras/msvs.py +++ b/waflib/extras/msvs.py @@ -304,7 +304,6 @@ def compile_template(line): indent = 0 buf = [] - dvars = [] app = buf.append def app(txt): @@ -759,7 +758,12 @@ class msvs_generator(BuildContext): self.collect_targets() self.add_aliases() self.collect_dirs() - self.all_projects.sort(key=lambda x: getattr(x, 'path', None) and x.path.abspath() or x.name) + default_project = getattr(self, 'default_project', None) + def sortfun(x): + if self.name == default_project: + return '' + return getattr(x, 'path', None) and x.path.abspath() or self.name + self.all_projects.sort(key=sortfun) def write_files(self): """