mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 02:06:01 +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)
|
boolean enterMultiCfgsDialog = (multiCfgs == null)
|
||||||
|| (multiCfgs == cfgDescs) || !areCfgsStillThere(multiCfgs);
|
|| (multiCfgs == cfgDescs) || !areCfgsStillThere(multiCfgs);
|
||||||
if (enterMultiCfgsDialog) {
|
if (enterMultiCfgsDialog) {
|
||||||
ICConfigurationDescription[] mcfgs = ConfigMultiSelectionDialog.select(cfgDescs);
|
ICConfigurationDescription[] mcfgs = ConfigMultiSelectionDialog.select(cfgDescs, parentComposite.getShell());
|
||||||
if (mcfgs == null || mcfgs.length == 0) {
|
if (mcfgs == null || mcfgs.length == 0) {
|
||||||
// return back to previous selection
|
// return back to previous selection
|
||||||
int cfgIndex = -1;
|
int cfgIndex = -1;
|
||||||
|
|
|
@ -45,9 +45,12 @@ public class ConfigMultiSelectionDialog extends Dialog {
|
||||||
private Label message;
|
private Label message;
|
||||||
private static ICConfigurationDescription[] result = null;
|
private static ICConfigurationDescription[] result = null;
|
||||||
|
|
||||||
public static ICConfigurationDescription[] select(ICConfigurationDescription[] _cfgds) {
|
/**
|
||||||
|
* @since 5.2
|
||||||
|
*/
|
||||||
|
public static ICConfigurationDescription[] select(ICConfigurationDescription[] _cfgds, Shell parentShell) {
|
||||||
cfgds = _cfgds;
|
cfgds = _cfgds;
|
||||||
ConfigMultiSelectionDialog d = new ConfigMultiSelectionDialog(CUIPlugin.getActiveWorkbenchShell());
|
ConfigMultiSelectionDialog d = new ConfigMultiSelectionDialog(parentShell);
|
||||||
if (d.open() == OK)
|
if (d.open() == OK)
|
||||||
return result;
|
return result;
|
||||||
return null;
|
return null;
|
||||||
|
@ -133,7 +136,22 @@ public class ConfigMultiSelectionDialog extends Dialog {
|
||||||
}});
|
}});
|
||||||
tv.setInput(cfgds);
|
tv.setInput(cfgds);
|
||||||
table.setFocus();
|
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