mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bugzilla – Bug 203877
This commit is contained in:
parent
c63295ed64
commit
b66a1834ea
1 changed files with 21 additions and 5 deletions
|
@ -102,6 +102,8 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
|
|||
private IWorkbenchAdapter fWorkbenchAdapter;
|
||||
private IMemoryBlockConnection fConnection;
|
||||
|
||||
private final static int MAX_MENU_COLUMN_COUNT = 8;
|
||||
|
||||
public TraditionalRendering(String id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -819,9 +821,8 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
|
|||
};
|
||||
displayColumnCountAuto.setChecked(fRendering.getColumnsSetting() == Rendering.COLUMNS_AUTO_SIZE_TO_FIT);
|
||||
|
||||
final int maxMenuColumnCount = 8;
|
||||
final Action[] displayColumnCounts = new Action[maxMenuColumnCount];
|
||||
for(int i = 0; i < maxMenuColumnCount; i++)
|
||||
final Action[] displayColumnCounts = new Action[MAX_MENU_COLUMN_COUNT];
|
||||
for(int i = 0; i < MAX_MENU_COLUMN_COUNT; i++)
|
||||
{
|
||||
final int finali = i;
|
||||
displayColumnCounts[i] = new Action(
|
||||
|
@ -874,7 +875,21 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
|
|||
}
|
||||
}
|
||||
);
|
||||
if (inputDialog.open() != Window.OK) return;
|
||||
|
||||
if (inputDialog.open() != Window.OK)
|
||||
{
|
||||
this.setChecked(false);
|
||||
int currentColumnSetting = TraditionalRendering.this.fRendering.getColumnsSetting();
|
||||
if(currentColumnSetting == Rendering.COLUMNS_AUTO_SIZE_TO_FIT)
|
||||
displayColumnCountAuto.setChecked(true);
|
||||
else if(currentColumnSetting > 0 && currentColumnSetting <= MAX_MENU_COLUMN_COUNT)
|
||||
displayColumnCounts[currentColumnSetting - 1].setChecked(true);
|
||||
else
|
||||
displayColumnCountCustomValue.setChecked(true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int newColumnCount = -1;
|
||||
try {
|
||||
newColumnCount = Integer.parseInt(inputDialog.getValue());
|
||||
|
@ -882,6 +897,7 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
|
|||
|
||||
TraditionalRendering.this.fRendering.setColumnsSetting(newColumnCount);
|
||||
this.setChecked(false);
|
||||
|
||||
displayColumnCountCustomValue.setChecked(true);
|
||||
displayColumnCountCustomValue.setText(Integer.valueOf(
|
||||
fRendering.getColumnsSetting()).toString());
|
||||
|
|
Loading…
Add table
Reference in a new issue