From 1d539373ab71c60b4c0aaf3f1104cf9d3d0b276b Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 19 Apr 2010 22:20:51 +0000 Subject: [PATCH] revert revision 12034 on VLocationDialog - found a better solution on MCountry - Fix [2856097] The "Enter new Location/Address" countries are not translate Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2856097 --- base/src/org/compiere/model/MCountry.java | 2 +- .../src/org/compiere/grid/ed/VLocationDialog.java | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/base/src/org/compiere/model/MCountry.java b/base/src/org/compiere/model/MCountry.java index 08adfc5b3d..ac474c958a 100644 --- a/base/src/org/compiere/model/MCountry.java +++ b/base/src/org/compiere/model/MCountry.java @@ -219,7 +219,7 @@ public final class MCountry extends X_C_Country */ public String getTrlName() { - if (m_trlName != null && s_AD_Language != null) + if (m_trlName == null && s_AD_Language != null) { m_trlName = get_Translation(COLUMNNAME_Name, s_AD_Language); if (m_trlName == null) diff --git a/client/src/org/compiere/grid/ed/VLocationDialog.java b/client/src/org/compiere/grid/ed/VLocationDialog.java index 4b7af60ed7..60f3a78e81 100644 --- a/client/src/org/compiere/grid/ed/VLocationDialog.java +++ b/client/src/org/compiere/grid/ed/VLocationDialog.java @@ -17,7 +17,6 @@ package org.compiere.grid.ed; import java.awt.BorderLayout; -import java.awt.Component; import java.awt.Frame; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; @@ -33,9 +32,7 @@ import java.util.logging.Level; import javax.swing.Box; import javax.swing.JComponent; import javax.swing.JLabel; -import javax.swing.JList; import javax.swing.JOptionPane; -import javax.swing.ListCellRenderer; import javax.swing.SwingConstants; import org.compiere.apps.ADialog; @@ -83,8 +80,6 @@ public class VLocationDialog extends CDialog private int m_WindowNo = 0; - private JLabel m_label = new JLabel(); - /** * Constructor * @@ -120,16 +115,6 @@ public class VLocationDialog extends CDialog // Current Country MCountry.setDisplayLanguage(Env.getAD_Language(Env.getCtx())); fCountry = new CComboBox(MCountry.getCountries(Env.getCtx())); - ListCellRenderer renderer = new ListCellRenderer() - { - public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) - { - String text = ((MCountry)value).get_Translation(MCountry.COLUMNNAME_Name, Env.getAD_Language(Env.getCtx())); - m_label.setText(text); - return m_label; - } - }; - fCountry.setRenderer(renderer); fCountry.setSelectedItem(m_location.getCountry()); m_origCountry_ID = m_location.getC_Country_ID(); // Current Region