mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 14:15:23 +02:00
NewLaunchConfig* notify listeners when table entries are selected
The NewLaunchConfig*Page classes don't notify their listeners when they automatically select a type or mode with table.select(). This causes the NewLaunchConfigEditPage to have a "null" type if the user doesn't explicitly click on one and thus opens the default page. Added in calls to table.notifyListeners() in order to fix this. Verified that the launch config edit page opens appropriately even if there is no explicit selection by the user Change-Id: I5fbafd2f43d7c0951e929f5dcbfc57fcccd18db6 Signed-off-by: Matthew Bastien <bastien.matthew@gmail.com>
This commit is contained in:
parent
3a921fdd83
commit
313b437b36
2 changed files with 6 additions and 3 deletions
|
@ -83,6 +83,9 @@ public class NewLaunchConfigModePage extends WizardPage {
|
|||
if (!hasDebug) {
|
||||
table.select(0);
|
||||
}
|
||||
|
||||
// We're guaranteed to have made a selection here
|
||||
table.notifyListeners(SWT.Selection, null);
|
||||
}
|
||||
|
||||
setControl(comp);
|
||||
|
@ -101,7 +104,6 @@ public class NewLaunchConfigModePage extends WizardPage {
|
|||
item.setData(group);
|
||||
}
|
||||
|
||||
|
||||
public ILaunchGroup getSelectedGroup() {
|
||||
return (ILaunchGroup) table.getSelection()[0].getData();
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ public class NewLaunchConfigTypePage extends WizardPage {
|
|||
|
||||
if (haveItems) {
|
||||
table.select(0);
|
||||
table.notifyListeners(SWT.Selection, null);
|
||||
}
|
||||
setPageComplete(haveItems);
|
||||
}
|
||||
|
@ -85,9 +86,9 @@ public class NewLaunchConfigTypePage extends WizardPage {
|
|||
public void addTypeSelectionListener(SelectionListener listener) {
|
||||
table.addSelectionListener(listener);
|
||||
}
|
||||
|
||||
|
||||
public ILaunchConfigurationType getSelectedType() {
|
||||
return (ILaunchConfigurationType) table.getSelection()[0].getData();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue