diff options
author | Jonathan Bauer | 2015-07-16 16:59:23 +0200 |
---|---|---|
committer | Jonathan Bauer | 2015-07-16 16:59:23 +0200 |
commit | 4b2a6e56958dcb2338725142d53892dd069a3a88 (patch) | |
tree | 158b0408cd251e9d5a3ac7b5c3cf720468fb4d10 | |
parent | [client] use Session.setSatelliteAddress and Session.getSatelliteAddress in L... (diff) | |
download | tutor-module-4b2a6e56958dcb2338725142d53892dd069a3a88.tar.gz tutor-module-4b2a6e56958dcb2338725142d53892dd069a3a88.tar.xz tutor-module-4b2a6e56958dcb2338725142d53892dd069a3a88.zip |
[client] ImageListWindow refresh image list when wizard returns successfully
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java index 00e4c3ca..9c0eead1 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageListWindow.java @@ -8,7 +8,9 @@ import org.apache.log4j.Logger; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.window.Window; import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.SelectionAdapter; @@ -51,7 +53,6 @@ public class ImageListWindow extends ImageListWindowLayout { filter.setSearchText(searchTextField.getText()); tableViewer.refresh(); } - }); // apply object filtering @@ -134,7 +135,7 @@ public class ImageListWindow extends ImageListWindowLayout { public void widgetSelected(SelectionEvent e) { ImageWizard wizard = new ImageWizard(false); WizardDialog wd = new WizardDialog(getShell(), wizard); - wd.open(); + refreshList(wd.open() == Window.OK); } }); @@ -144,6 +145,7 @@ public class ImageListWindow extends ImageListWindowLayout { ImageWizard wizard = new ImageWizard(true); WizardDialog wd = new WizardDialog(getShell(), wizard); wd.open(); + refreshList(wd.open() == Window.OK); } }); //deleteImageVersion @@ -184,8 +186,8 @@ public class ImageListWindow extends ImageListWindowLayout { }); } - private boolean refreshList() { - List<ImageSummaryRead> imageList = ImageCache.get(false); + private boolean refreshList(boolean forceRefresh) { + List<ImageSummaryRead> imageList = ImageCache.get(forceRefresh); tableViewer.setInput(imageList); tableViewer.refresh(); @@ -199,7 +201,7 @@ public class ImageListWindow extends ImageListWindowLayout { @Override public void show() { - refreshList(); + refreshList(false); } public void deleteCallback(ImageSummaryRead image, Throwable t) { |