[yocto] [PATCH] plugins/sdk.ide: Fix setting default profile

Timo Mueller mail at timomueller.eu
Thu Mar 14 08:01:31 PDT 2013


From: Timo Mueller <timo.mueller at bmw-carit.de>

This fixes a regression where the default profile was not changed if
the content of the UI settings were identical.

The regression was introduced with
f93aabf17df2c9a8971c4b428f67a9273c011233

Signed-off-by: Timo Mueller <timo.mueller at bmw-carit.de>
---
 .../src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java
index d6a7c4f..2c482f7 100644
--- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java
+++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java
@@ -123,11 +123,14 @@ public class YoctoSDKPreferencePage extends PreferencePage implements IWorkbench
 		YoctoUIElement savedElement = YoctoSDKUtils.getElemFromStore(getPreferenceStore());
 		YoctoUIElement modifiedElement = yoctoUISetting.getCurrentInput();
 
-		if (savedElement.equals(modifiedElement)) {
+		YoctoProfileElement savedProfileElement = YoctoSDKUtils.getProfilesFromDefaultStore();
+		YoctoProfileElement profileElement = yoctoProfileSetting.getCurrentInput();
+
+		if (savedElement.equals(modifiedElement) &&
+				profileElement.getSelectedProfile().equals(savedProfileElement.getSelectedProfile())) {
 			return true;
 		}
 
-		YoctoProfileElement profileElement = yoctoProfileSetting.getCurrentInput();
 		HashSet<IProject> yoctoProjects = getAffectedProjects(profileElement.getSelectedProfile());
 
 		if (!yoctoProjects.isEmpty()) {
-- 
1.7.11.7




More information about the yocto mailing list