From: Rejean Loyer Date: Mon, 6 May 2013 23:11:00 +0000 (-0400) Subject: ide; implemented when adding project to workspace, use selected config if available... X-Git-Tag: 0.44.08~151 X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebd22a37597eb8b213a52e11698379bc86efeff1;hp=d296d8d44be5819802910aca7e5bf0f7b2a6e36f;p=sdk ide; implemented when adding project to workspace, use selected config if available. also fixed active config selection options are not updated when removing a project from the workspace. closes #799 and #896. --- diff --git a/ide/src/ide.ec b/ide/src/ide.ec index 43b8f29..2d1f922 100644 --- a/ide/src/ide.ec +++ b/ide/src/ide.ec @@ -1740,7 +1740,7 @@ class IDEWorkSpace : Window else { toolBar.activeConfig.Clear(); - row = toolBar.activeConfig.AddString("(Mixed)"); + row = toolBar.activeConfig.AddString($"(Mixed)"); row.tag = 1; } if(workspace) @@ -2229,9 +2229,24 @@ class IDEWorkSpace : Window prj = LoadProject(filePath, null); if(prj) { + char * activeConfigName = null; CompilerConfig compiler = ideSettings.GetCompilerConfig(workspace.compiler); prj.StartMonitoring(); workspace.projects.Add(prj); + if(toolBar.activeConfig.currentRow && toolBar.activeConfig.currentRow != toolBar.activeConfig.firstRow && + toolBar.activeConfig.currentRow.string && toolBar.activeConfig.currentRow.string[0]) + activeConfigName = toolBar.activeConfig.currentRow.string; + if(activeConfigName) + { + for(cfg : prj.configurations) + { + if(cfg.name && !strcmp(cfg.name, activeConfigName)) + { + prj.config = cfg; + break; + } + } + } if(projectView) projectView.AddNode(prj.topNode, null); workspace.modified = true; diff --git a/ide/src/project/Workspace.ec b/ide/src/project/Workspace.ec index 768dc3c..0a7d3d2 100644 --- a/ide/src/project/Workspace.ec +++ b/ide/src/project/Workspace.ec @@ -452,6 +452,7 @@ public: DropInvalidBreakpoints(); modified = true; ide.findInFilesDialog.RemoveProjectItem(project); + ide.UpdateToolBarActiveConfigs(false); Save(); delete project;