Browsevar: Use the constant instead of the hardcoded value 32/11332/3
Sylvestre Ledru [Thu, 25 Apr 2013 13:45:05 +0000 (15:45 +0200)]
Change-Id: Ib8659c573bd6d44c25317dbdf70aeecb3b459d86

scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/variablebrowser/actions/DeleteAction.java

index 58c8aa9..c53c017 100644 (file)
@@ -24,6 +24,7 @@ import java.awt.event.ActionListener;
 import javax.swing.JTable;
 
 import org.scilab.modules.ui_data.utils.UiDataMessages;
+import org.scilab.modules.ui_data.BrowseVar;
 
 import static org.scilab.modules.action_binding.highlevel.ScilabInterpreterManagement.asynchronousScilabExec;
 
@@ -109,7 +110,7 @@ public final class DeleteAction extends CommonCallBack {
         int clickedRow = variableBrowser.getTable().getSelectedRow();
         // Does nothing if no variable selected
         if (clickedRow != -1) {
-            return variableBrowser.getTable().getValueAt(clickedRow, 1).toString();
+            return variableBrowser.getTable().getValueAt(clickedRow, BrowseVar.NAME_COLUMN_INDEX).toString();
         }
         return "";
     }