Project

General

Profile

Revision 34227fd8

ID34227fd826d1fd6e43b82f22ec35a5123bc9d813
Parent 9c384528
Child 7f3f2b38

Added by Patrick Plitzner over 2 years ago

fix #8332 Scroll 1px before exporting to load all rows in tree format

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixToolbar.java
18 18
import org.eclipse.jface.viewers.ArrayContentProvider;
19 19
import org.eclipse.jface.viewers.ComboViewer;
20 20
import org.eclipse.jface.viewers.LabelProvider;
21
import org.eclipse.nebula.widgets.nattable.command.VisualRefreshCommand;
21 22
import org.eclipse.nebula.widgets.nattable.export.command.ExportCommand;
22 23
import org.eclipse.nebula.widgets.nattable.persistence.PersistenceHelper;
23 24
import org.eclipse.nebula.widgets.nattable.persistence.command.DisplayPersistenceDialogCommand;
......
27 28
import org.eclipse.nebula.widgets.nattable.persistence.gui.PersistenceDialog;
28 29
import org.eclipse.nebula.widgets.nattable.tree.command.TreeCollapseAllCommand;
29 30
import org.eclipse.nebula.widgets.nattable.tree.command.TreeExpandAllCommand;
31
import org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer;
30 32
import org.eclipse.swt.SWT;
31 33
import org.eclipse.swt.events.SelectionAdapter;
32 34
import org.eclipse.swt.events.SelectionEvent;
......
233 235
        btnExcelExport.addSelectionListener(new SelectionAdapter() {
234 236
            @Override
235 237
            public void widgetSelected(SelectionEvent e) {
238
                // hack for fixing #8332
239
                // By scrolling for only 1 pixel the export then exports all rows
240
                ViewportLayer viewportLayer = matrix.getBodyLayer().getViewportLayer();
241
                if(viewportLayer.getOrigin().getY()==0){
242
                    viewportLayer.setOriginY(1);
243
                }
236 244
                matrix.getNatTable().doCommand(
237 245
                        new ExportCommand(
238 246
                                matrix.getNatTable().getConfigRegistry(),
239 247
                                matrix.getNatTable().getShell()));
248
                matrix.getNatTable().doCommand(new VisualRefreshCommand());
240 249
            }
241 250
        });
242 251

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)