1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-26 18:35:32 +02:00

[247763] [traditional memory rendering] column count popup menus include blank item

This commit is contained in:
Ted Williams 2008-09-18 00:16:00 +00:00
parent 13adefb692
commit a26d5d6642

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006-2008 Wind River Systems, Inc. and others. * Copyright (c) 2006 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -919,11 +919,6 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
{ {
} }
}; };
boolean currentCountIsCustom = true;
for(int i = 0, j = 1; i < MAX_MENU_COLUMN_COUNT && currentCountIsCustom; i++, j*=2)
currentCountIsCustom = (j != fRendering.getColumnsSetting());
displayColumnCountCustomValue.setChecked(currentCountIsCustom);
final Action displayColumnCountCustom = new Action( final Action displayColumnCountCustom = new Action(
TraditionalRenderingMessages TraditionalRenderingMessages
@ -1040,8 +1035,13 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
sub.add(displayColumnCountAuto); sub.add(displayColumnCountAuto);
for(int i = 0; i < displayColumnCounts.length; i++) for(int i = 0; i < displayColumnCounts.length; i++)
sub.add(displayColumnCounts[i]); sub.add(displayColumnCounts[i]);
if(displayColumnCountCustomValue.isChecked())
boolean currentCountIsCustom = fRendering.getColumnsSetting() != 0;
for(int i = 0, j = 1; i < MAX_MENU_COLUMN_COUNT && currentCountIsCustom; i++, j*=2)
currentCountIsCustom = (j != fRendering.getColumnsSetting());
if(currentCountIsCustom)
sub.add(displayColumnCountCustomValue); sub.add(displayColumnCountCustomValue);
sub.add(displayColumnCountCustom); sub.add(displayColumnCountCustom);
manager.add(sub); manager.add(sub);
manager.add(new Separator()); manager.add(new Separator());