1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Fix for bugzilla 75529 -- [Managed Build] Shouldn't go to the beginning on configuration changing

Corrected a problem whereby a tree selection on a selected option would hide the options.
This commit is contained in:
Sean Evoy 2005-01-31 20:52:36 +00:00
parent db9b29f9d7
commit 6a104cdd5b

View file

@ -192,10 +192,6 @@ public class ToolsSettingsBlock extends AbstractCOptionPage {
* @param category * @param category
*/ */
private void displayOptionsForCategory(IOptionCategory category) { private void displayOptionsForCategory(IOptionCategory category) {
// Do nothing if the selected category is is unchanged
if (category == selectedCategory) {
return;
}
selectedTool = null; selectedTool = null;
selectedCategory = category; selectedCategory = category;
@ -241,7 +237,7 @@ public class ToolsSettingsBlock extends AbstractCOptionPage {
// save the last page build options. // save the last page build options.
// If the last page is tool page then parse all the options // If the last page is tool page then parse all the options
// and put it in the appropriate preference store. // and put it in the appropriate preference store.
if (oldPage != null){ if (oldPage != null && oldPage != currentSettingsPage){
if(oldPage instanceof BuildOptionSettingsPage) { if(oldPage instanceof BuildOptionSettingsPage) {
((BuildOptionSettingsPage)oldPage).storeSettings(); ((BuildOptionSettingsPage)oldPage).storeSettings();
} }
@ -254,7 +250,7 @@ public class ToolsSettingsBlock extends AbstractCOptionPage {
if(currentSettingsPage instanceof BuildOptionSettingsPage) if(currentSettingsPage instanceof BuildOptionSettingsPage)
((BuildOptionSettingsPage)currentSettingsPage).updateFields(); ((BuildOptionSettingsPage)currentSettingsPage).updateFields();
if (oldPage != null) if (oldPage != null && oldPage != currentSettingsPage)
oldPage.setVisible(false); oldPage.setVisible(false);
// Set the size of the scrolled area // Set the size of the scrolled area
@ -267,9 +263,6 @@ public class ToolsSettingsBlock extends AbstractCOptionPage {
* @param tool * @param tool
*/ */
private void displayOptionsForTool(ITool tool) { private void displayOptionsForTool(ITool tool) {
if (tool == selectedTool) {
return;
}
// Unselect the category // Unselect the category
selectedCategory = null; selectedCategory = null;
// record that the tool selection has changed // record that the tool selection has changed
@ -316,7 +309,7 @@ public class ToolsSettingsBlock extends AbstractCOptionPage {
currentSettingsPage.setVisible(true); currentSettingsPage.setVisible(true);
// Save the last page build options. // Save the last page build options.
if (oldPage != null){ if (oldPage != null && oldPage != currentSettingsPage){
if(oldPage instanceof BuildOptionSettingsPage) { if(oldPage instanceof BuildOptionSettingsPage) {
((BuildOptionSettingsPage)oldPage).storeSettings(); ((BuildOptionSettingsPage)oldPage).storeSettings();
} }
@ -329,7 +322,7 @@ public class ToolsSettingsBlock extends AbstractCOptionPage {
if(currentSettingsPage instanceof BuildToolSettingsPage) if(currentSettingsPage instanceof BuildToolSettingsPage)
((BuildToolSettingsPage)currentSettingsPage).updateAllOptionField(); ((BuildToolSettingsPage)currentSettingsPage).updateAllOptionField();
if (oldPage != null) if (oldPage != null && oldPage != currentSettingsPage)
oldPage.setVisible(false); oldPage.setVisible(false);
// Set the size of the scrolled area // Set the size of the scrolled area
@ -409,6 +402,7 @@ public class ToolsSettingsBlock extends AbstractCOptionPage {
// There is a selected tool defined // There is a selected tool defined
primary = selectedTool; primary = selectedTool;
} else if (selectedCategory != null) { } else if (selectedCategory != null) {
// if (selectedCategory != null) {
// There is a selected option or category // There is a selected option or category
primary = selectedCategory; primary = selectedCategory;
} else { } else {
@ -423,7 +417,7 @@ public class ToolsSettingsBlock extends AbstractCOptionPage {
} }
if (primary != null) { if (primary != null) {
optionList.setSelection(new StructuredSelection(primary)); optionList.setSelection(new StructuredSelection(primary), true);
} }
} }