diff --git a/core/resources/l10n/messages.properties b/core/resources/l10n/messages.properties index 4b4a5ef39..28fd4d8c1 100644 --- a/core/resources/l10n/messages.properties +++ b/core/resources/l10n/messages.properties @@ -2100,7 +2100,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Match fore diameter ComponentPresetChooserDialog.menu.sortAsc = Sort Ascending ComponentPresetChooserDialog.menu.sortDesc = Sort Descending ComponentPresetChooserDialog.menu.units = Units -ComponentPresetChooserDialog.checkbox.showAllCompatible = Show all compatible ComponentPresetChooserDialog.checkbox.showLegacyCheckBox = Show Legacy Database ComponentPresetChooserDialog.lbl.favorites = Check to add preset to the preset drop-down menu in the component edit dialog
Directly apply a preset by double-clicking it or by selecting it and closing this window. table.column.Favorite = Favorite diff --git a/core/resources/l10n/messages_cs.properties b/core/resources/l10n/messages_cs.properties index a30ef6392..c468f0efd 100644 --- a/core/resources/l10n/messages_cs.properties +++ b/core/resources/l10n/messages_cs.properties @@ -1599,7 +1599,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Shoda predn ComponentPresetChooserDialog.menu.sortAsc = Serad vzestupne ComponentPresetChooserDialog.menu.sortDesc = Serad sestupne ComponentPresetChooserDialog.menu.units = Jednotky -ComponentPresetChooserDialog.checkbox.showAllCompatible = Uka\u017E v\u0161e co je kompaktibilní table.column.Favorite = Oblíbené table.column.Manufacturer = Výrobce table.column.PartNo = Císlo soucástky diff --git a/core/resources/l10n/messages_de.properties b/core/resources/l10n/messages_de.properties index 5a1d9a7ec..00db40c25 100644 --- a/core/resources/l10n/messages_de.properties +++ b/core/resources/l10n/messages_de.properties @@ -1657,7 +1657,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Vorderer Durchmesser ComponentPresetChooserDialog.menu.sortAsc = Aufsteigend sortieren ComponentPresetChooserDialog.menu.sortDesc = Absteigend sortieren ComponentPresetChooserDialog.menu.units = Einheiten -ComponentPresetChooserDialog.checkbox.showAllCompatible = Alle kompatiblen anzeigen table.column.Favorite = Favorit table.column.Manufacturer = Hersteller table.column.PartNo = Teile-Nummer diff --git a/core/resources/l10n/messages_es.properties b/core/resources/l10n/messages_es.properties index 556fd9ede..c62fc1314 100644 --- a/core/resources/l10n/messages_es.properties +++ b/core/resources/l10n/messages_es.properties @@ -153,7 +153,6 @@ ComponentIcons.disabled = (Deshabilitado) ComponentPresetChooserDialog.checkbox.filterAftDiameter = Ajustado al di\u00e1metro trasero ComponentPresetChooserDialog.checkbox.filterForeDiameter = Ajustado al di\u00e1metro delantero -ComponentPresetChooserDialog.checkbox.showAllCompatible = Mostrar todos los compatibles ComponentPresetChooserDialog.filter.label = Filtro: ComponentPresetChooserDialog.lbl.favorites = Seleccione los items que aparecer\u00e1n en el desplegable de materiales. ComponentPresetChooserDialog.menu.sortAsc = Orden ascendente diff --git a/core/resources/l10n/messages_fr.properties b/core/resources/l10n/messages_fr.properties index 350bc5874..7144b1beb 100644 --- a/core/resources/l10n/messages_fr.properties +++ b/core/resources/l10n/messages_fr.properties @@ -143,7 +143,6 @@ ComponentIcons.disabled = (d\u00E9sactiv\u00E9) ComponentPresetChooserDialog.checkbox.filterAftDiameter = Match aft diameter ComponentPresetChooserDialog.checkbox.filterForeDiameter = Match fore diameter -ComponentPresetChooserDialog.checkbox.showAllCompatible = Montrer tous ceux qui sont compatibles ComponentPresetChooserDialog.filter.label = Filtrer: ComponentPresetChooserDialog.lbl.favorites = Select to add preset to drop-down menu ComponentPresetChooserDialog.menu.sortAsc = Trier par ordre croissant diff --git a/core/resources/l10n/messages_it.properties b/core/resources/l10n/messages_it.properties index 0596e8fc5..705818f16 100644 --- a/core/resources/l10n/messages_it.properties +++ b/core/resources/l10n/messages_it.properties @@ -1663,7 +1663,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Allinea al diametro a ComponentPresetChooserDialog.menu.sortAsc = Ordine ascendente ComponentPresetChooserDialog.menu.sortDesc = Ordine decrescente ComponentPresetChooserDialog.menu.units = Unit\u00e0 -ComponentPresetChooserDialog.checkbox.showAllCompatible = Mostra tutti i compatibili table.column.Favorite = Preferito table.column.Manufacturer = Produttore table.column.PartNo = Numero del pezzo diff --git a/core/resources/l10n/messages_ja.properties b/core/resources/l10n/messages_ja.properties index 3daf4089e..3cad38a7e 100644 --- a/core/resources/l10n/messages_ja.properties +++ b/core/resources/l10n/messages_ja.properties @@ -1725,7 +1725,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = \u524D\u65B9\u306E\u ComponentPresetChooserDialog.menu.sortAsc = \u6607\u9806\u30BD\u30FC\u30C8 ComponentPresetChooserDialog.menu.sortDesc = \u964D\u9806\u30BD\u30FC\u30C8 ComponentPresetChooserDialog.menu.units = \u5358\u4F4D -ComponentPresetChooserDialog.checkbox.showAllCompatible = \u3059\u3079\u3066\u306E\u90E8\u54C1\u3092\u8868\u793A ComponentPresetChooserDialog.lbl.favorites = Select to add preset to drop-down menu table.column.Favorite = \u304A\u6C17\u306B\u5165\u308A table.column.Manufacturer = \u88FD\u9020\u4F1A\u793E diff --git a/core/resources/l10n/messages_nl.properties b/core/resources/l10n/messages_nl.properties index e56d9c752..f2d1c16d4 100644 --- a/core/resources/l10n/messages_nl.properties +++ b/core/resources/l10n/messages_nl.properties @@ -1986,7 +1986,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Gelijke voordiameter ComponentPresetChooserDialog.menu.sortAsc = Sorteer oplopend ComponentPresetChooserDialog.menu.sortDesc = Sorteer aflopend ComponentPresetChooserDialog.menu.units = Eenheden -ComponentPresetChooserDialog.checkbox.showAllCompatible = Toon alle compatibele ComponentPresetChooserDialog.lbl.favorites = Selecteer om preset aan drop-down menu toe te voegen table.column.Favorite = Favoriet table.column.Manufacturer = Fabrikant diff --git a/core/resources/l10n/messages_pl.properties b/core/resources/l10n/messages_pl.properties index 4c1cefc01..0cd1a4d19 100644 --- a/core/resources/l10n/messages_pl.properties +++ b/core/resources/l10n/messages_pl.properties @@ -1604,7 +1604,6 @@ update.dlg.latestVersion = Korzystasz z najnowszej wersji OpenRocket: %s. ComponentPresetChooserDialog.menu.sortAsc = Szereguj rosn\u0105co ComponentPresetChooserDialog.menu.sortDesc = Szereguj malej\u0105co ComponentPresetChooserDialog.menu.units = Jednostki - ComponentPresetChooserDialog.checkbox.showAllCompatible = Poka\u017C wszystkie kompatybilne table.column.Favorite = Ulubione table.column.Manufacturer = Producent table.column.PartNo = Numer cz\u0119\u015Bci diff --git a/core/resources/l10n/messages_pt.properties b/core/resources/l10n/messages_pt.properties index 18ce530f8..85f9c255f 100644 --- a/core/resources/l10n/messages_pt.properties +++ b/core/resources/l10n/messages_pt.properties @@ -135,7 +135,6 @@ ComponentIcons.disabled = (desabilitado) ComponentPresetChooserDialog.checkbox.filterAftDiameter = Ajuste do di\u00e2metro traseiro ComponentPresetChooserDialog.checkbox.filterForeDiameter = Ajustar di\u00e2metro dianteiro -ComponentPresetChooserDialog.checkbox.showAllCompatible = Mostrar todos compat\u00edveis ComponentPresetChooserDialog.filter.label = Filtrar por texto: ComponentPresetChooserDialog.lbl.favorites = Selecione para adicionar predefinido para menu drop-down ComponentPresetChooserDialog.menu.sortAsc = Classifica\u00e7\u00e3o Crescente diff --git a/core/resources/l10n/messages_ru.properties b/core/resources/l10n/messages_ru.properties index 2a519d714..d4ca9a7de 100644 --- a/core/resources/l10n/messages_ru.properties +++ b/core/resources/l10n/messages_ru.properties @@ -2101,7 +2101,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = \u0418\u0441\u043A\u0 ComponentPresetChooserDialog.menu.sortAsc = \u041F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044E ComponentPresetChooserDialog.menu.sortDesc = \u041F\u043E \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044E ComponentPresetChooserDialog.menu.units = \u0415\u0434\u0438\u043D\u0438\u0446\u044B \u0438\u0437\u043C\u0435\u0440\u0435\u043D\u0438\u044F -ComponentPresetChooserDialog.checkbox.showAllCompatible = \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435 \u0441\u043E\u0432\u043C\u0435\u0441\u0442\u0438\u043C\u044B\u0435 ComponentPresetChooserDialog.checkbox.showLegacyCheckBox = \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u0430\u0437\u0443 \u0434\u0430\u043D\u043D\u044B\u0445 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 ComponentPresetChooserDialog.lbl.favorites = \u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u044D\u0442\u043E\u0442 \u0444\u043B\u0430\u0436\u043E\u043A, \u0447\u0442\u043E\u0431\u044B \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u0433\u043E\u0442\u043E\u0432\u043A\u0443 \u0432 \u0440\u0430\u0441\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0435\u0435\u0441\u044F \u043C\u0435\u043D\u044E \u0437\u0430\u0433\u043E\u0442\u043E\u0432\u043E\u043A \u0432 \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432\u043E\u043C \u043E\u043A\u043D\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0430. table.column.Favorite = \u0418\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435 diff --git a/core/resources/l10n/messages_uk_UA.properties b/core/resources/l10n/messages_uk_UA.properties index a7fc899ed..cdf5223ce 100644 --- a/core/resources/l10n/messages_uk_UA.properties +++ b/core/resources/l10n/messages_uk_UA.properties @@ -1831,7 +1831,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Match fore diameter ComponentPresetChooserDialog.menu.sortAsc = Sort Ascending ComponentPresetChooserDialog.menu.sortDesc = Sort Descending ComponentPresetChooserDialog.menu.units = Units -ComponentPresetChooserDialog.checkbox.showAllCompatible = Show all compatible ComponentPresetChooserDialog.lbl.favorites = Select to add preset to drop-down menu table.column.Favorite = Favorite table.column.Manufacturer = Manufacturer diff --git a/core/resources/l10n/messages_zh_CN.properties b/core/resources/l10n/messages_zh_CN.properties index e968675da..58859ec81 100644 --- a/core/resources/l10n/messages_zh_CN.properties +++ b/core/resources/l10n/messages_zh_CN.properties @@ -158,7 +158,6 @@ ComponentIcons.disabled = (\u5DF2\u7981\u7528) ComponentPresetChooserDialog.checkbox.filterAftDiameter = \u5339\u914D\u540E\u76F4\u5F84 ComponentPresetChooserDialog.checkbox.filterForeDiameter = \u5339\u914D\u524D\u76F4\u5F84 -ComponentPresetChooserDialog.checkbox.showAllCompatible = \u663E\u793A\u6240\u6709\u517C\u5BB9\u7EC4\u4EF6 ComponentPresetChooserDialog.filter.label = \u6587\u672C\u8FC7\u6EE4: ComponentPresetChooserDialog.lbl.favorites = \u6DFB\u52A0\u5230\u9884\u8BBE\u4E0B\u62C9\u6846 ComponentPresetChooserDialog.menu.sortAsc = \u5347\u5E8F diff --git a/core/src/net/sf/openrocket/preset/ComponentPreset.java b/core/src/net/sf/openrocket/preset/ComponentPreset.java index b92c4fcaa..993fc0f82 100644 --- a/core/src/net/sf/openrocket/preset/ComponentPreset.java +++ b/core/src/net/sf/openrocket/preset/ComponentPreset.java @@ -174,24 +174,10 @@ public class ComponentPreset implements Comparable, Serializabl this.displayedColumns = displayedColumns; } - public List getCompatibleTypes() { - return compatibleTypeMap.get(Type.this); - } - public TypedKey[] getDisplayedColumns() { return displayedColumns; } - private static final Map> compatibleTypeMap = new HashMap>(); - - static { - compatibleTypeMap.put(BODY_TUBE, Arrays.asList(BODY_TUBE, TUBE_COUPLER, LAUNCH_LUG)); - compatibleTypeMap.put(TUBE_COUPLER, Arrays.asList(BODY_TUBE, TUBE_COUPLER, LAUNCH_LUG)); - compatibleTypeMap.put(LAUNCH_LUG, Arrays.asList(BODY_TUBE, TUBE_COUPLER, LAUNCH_LUG)); - compatibleTypeMap.put(CENTERING_RING, Arrays.asList(CENTERING_RING, ENGINE_BLOCK)); - compatibleTypeMap.put(NOSE_CONE, Arrays.asList(NOSE_CONE, TRANSITION)); - } - } public final static TypedKey LEGACY = new TypedKey("Legacy", Boolean.class); diff --git a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java index 3954bb3fa..afa0f905f 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java @@ -177,28 +177,6 @@ public class ComponentPresetChooserDialog extends JDialog { private JPanel getFilterCheckboxes(XTableColumnModel tm, int legacyColumnIndex) { JPanel panel = new JPanel(new MigLayout("ins 0")); - - /* - * Add show all compatible check box. - */ - final List compatibleTypes = component.getPresetType().getCompatibleTypes(); - final ComponentPreset.Type nativeType = component.getPresetType(); - if (compatibleTypes != null && compatibleTypes.size() > 0) { - JCheckBox showAll = new JCheckBox(); - showAll.setText(trans.get("ComponentPresetChooserDialog.checkbox.showAllCompatible")); - panel.add(showAll, "wrap"); - showAll.addItemListener(new ItemListener() { - @Override - public void itemStateChanged(ItemEvent e) { - if (((JCheckBox) e.getItem()).isSelected()) { - presets = Application.getComponentPresetDao().listForTypes(compatibleTypes); - } else { - presets = Application.getComponentPresetDao().listForType(nativeType); - } - componentSelectionTable.updateData(presets); - } - }); - } /* * Add legacy component filter checkbox