mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
bug 269313: wrong shell focus after multiple configurations selection
patch from Irit Belezko
This commit is contained in:
parent
32b3cb1228
commit
ed95e2bbdf
2 changed files with 23 additions and 5 deletions
|
@ -406,7 +406,7 @@ implements
|
|||
boolean enterMultiCfgsDialog = (multiCfgs == null)
|
||||
|| (multiCfgs == cfgDescs) || !areCfgsStillThere(multiCfgs);
|
||||
if (enterMultiCfgsDialog) {
|
||||
ICConfigurationDescription[] mcfgs = ConfigMultiSelectionDialog.select(cfgDescs);
|
||||
ICConfigurationDescription[] mcfgs = ConfigMultiSelectionDialog.select(cfgDescs, parentComposite.getShell());
|
||||
if (mcfgs == null || mcfgs.length == 0) {
|
||||
// return back to previous selection
|
||||
int cfgIndex = -1;
|
||||
|
|
|
@ -45,9 +45,12 @@ public class ConfigMultiSelectionDialog extends Dialog {
|
|||
private Label message;
|
||||
private static ICConfigurationDescription[] result = null;
|
||||
|
||||
public static ICConfigurationDescription[] select(ICConfigurationDescription[] _cfgds) {
|
||||
/**
|
||||
* @since 5.2
|
||||
*/
|
||||
public static ICConfigurationDescription[] select(ICConfigurationDescription[] _cfgds, Shell parentShell) {
|
||||
cfgds = _cfgds;
|
||||
ConfigMultiSelectionDialog d = new ConfigMultiSelectionDialog(CUIPlugin.getActiveWorkbenchShell());
|
||||
ConfigMultiSelectionDialog d = new ConfigMultiSelectionDialog(parentShell);
|
||||
if (d.open() == OK)
|
||||
return result;
|
||||
return null;
|
||||
|
@ -133,7 +136,22 @@ public class ConfigMultiSelectionDialog extends Dialog {
|
|||
}});
|
||||
tv.setInput(cfgds);
|
||||
table.setFocus();
|
||||
return composite;
|
||||
return composite;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated (in org.eclipse.cdt.ui 5.2.0)
|
||||
*
|
||||
* This call is deprecated in plugin org.eclipse.cdt.ui 5.2.0 and intended to be removed
|
||||
* on occasion when the plugin increases major version (Bug 285033).
|
||||
* Use {@link #select(ICConfigurationDescription[], Shell)} to properly set focus.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ICConfigurationDescription[] select(ICConfigurationDescription[] _cfgds) {
|
||||
cfgds = _cfgds;
|
||||
ConfigMultiSelectionDialog d = new ConfigMultiSelectionDialog(CUIPlugin.getActiveWorkbenchShell());
|
||||
if (d.open() == OK)
|
||||
return result;
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue