Revision: 4327 http://sourceforge.net/p/jump-pilot/code/4327 Author: michaudm Date: 2015-02-27 23:59:43 +0000 (Fri, 27 Feb 2015) Log Message: ----------- Fix bug #388 shrinking columns in infoFrame and attributeTable when the schema has changed.
Modified Paths: -------------- core/trunk/ChangeLog core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/ViewSchemaPlugIn.java Modified: core/trunk/ChangeLog =================================================================== --- core/trunk/ChangeLog 2015-02-27 21:18:45 UTC (rev 4326) +++ core/trunk/ChangeLog 2015-02-27 23:59:43 UTC (rev 4327) @@ -1,4 +1,9 @@ # for display continuity sake please use 2 spaces instead of tabs + +2015-02-28 mmichaud <m.michael.mich...@orange.fr> + * Fix bug #388 shrinking columns in infoFrame and attributeTable + when the schema has changed. + 2015_02_22 Giuseppe Aruta (ma15569) - Add 2 new plugin to manage nodata values on monoband DEM a) Change No Data Value: it changes default nodata value of file Modified: core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/ViewSchemaPlugIn.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/ViewSchemaPlugIn.java 2015-02-27 21:18:45 UTC (rev 4326) +++ core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/ViewSchemaPlugIn.java 2015-02-27 23:59:43 UTC (rev 4327) @@ -53,12 +53,7 @@ import com.vividsolutions.jump.workbench.model.LayerManagerProxy; import com.vividsolutions.jump.workbench.model.Layerable; import com.vividsolutions.jump.workbench.plugin.*; -import com.vividsolutions.jump.workbench.ui.LayerNamePanel; -import com.vividsolutions.jump.workbench.ui.LayerNamePanelListener; -import com.vividsolutions.jump.workbench.ui.LayerNamePanelProxy; -import com.vividsolutions.jump.workbench.ui.SchemaPanel; -import com.vividsolutions.jump.workbench.ui.TreeLayerNamePanel; -import com.vividsolutions.jump.workbench.ui.WorkbenchFrame; +import com.vividsolutions.jump.workbench.ui.*; import com.vividsolutions.jump.workbench.ui.cursortool.editing.EditingPlugIn; import com.vividsolutions.jump.workbench.ui.images.IconLoader; import com.vividsolutions.jump.workbench.ui.renderer.style.ColorThemingStyle; @@ -103,7 +98,7 @@ return I18N.get("ui.plugin.ViewSchemaPlugIn.view-edit-schema"); } - private void applyChanges(final Layer layer, final SchemaPanel panel) + private void applyChanges(final Layer layer, final SchemaPanel panel, final WorkbenchFrame workbenchFrame) throws Exception { if (!panel.isModified()) { //User just pressed the Apply button even though he made no edits. @@ -117,6 +112,14 @@ panel.getModel().removeBlankRows(); + // If the schema is modified, features of the layer are changed, + // the corresponding attributeTab in the InfoFrame is emptied and + // the columns are schrinked to a null width. + // Removing the attributeTab in the InfoFrame avoid these side effects + for (JInternalFrame iFrame : workbenchFrame.getInternalFrames()) { + if (iFrame instanceof InfoFrame) ((InfoFrame)iFrame).getModel().remove(layer); + } + FeatureSchema newSchema = new FeatureSchema(); //-- [sstein 10. Oct 2006] bugfix for colortheming by Ole FeatureSchema oldSchema = layer.getFeatureCollectionWrapper().getFeatureSchema(); @@ -689,7 +692,7 @@ public void actionPerformed(ActionEvent e) { try { commitEditsInProgress(panel); - applyChanges(layer, panel); + applyChanges(layer, panel, workbenchFrame); } catch (Exception x) { workbenchFrame.handleThrowable(x); } @@ -712,10 +715,9 @@ case JOptionPane.YES_OPTION: try { - applyChanges(layer, panel); + applyChanges(layer, panel, workbenchFrame); } catch (Exception x) { workbenchFrame.handleThrowable(x); - return; } ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel