Skip to content

Commit

Permalink
Tidy up isEmpty calls
Browse files Browse the repository at this point in the history
  • Loading branch information
berry120 committed Dec 20, 2023
1 parent af9efcd commit d3fb446
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@
import org.quelea.services.languages.LabelGrabber;
import org.quelea.services.utils.QueleaProperties;
import org.quelea.windows.image.ImageDrawer;
import org.quelea.windows.main.AbstractPanel;
import org.quelea.windows.main.DisplayCanvas;
import org.quelea.windows.main.DisplayableDrawer;
import org.quelea.windows.main.LivePanel;
import org.quelea.windows.main.LivePreviewPanel;
import org.quelea.windows.main.QueleaApp;
import org.quelea.windows.main.*;

/**
* The panel for displaying presentation slides in the live / preview panels.
Expand Down Expand Up @@ -162,7 +157,7 @@ public void handle(ActionEvent actionEvent) {
LivePanel lp = QueleaApp.get().getMainWindow().getMainPanel().getLivePanel();
if (lp.getDisplayable() instanceof PresentationDisplayable) {
String result = PowerPointHandler.getCurrentSlide();
if (!result.contains("not running") && !result.equals("")) {
if (!result.contains("not running") && !result.isEmpty()) {
int i = Integer.parseInt(result);
presentationPreview.select(i, false);
}
Expand Down Expand Up @@ -223,7 +218,7 @@ public void handle(ActionEvent actionEvent) {
LivePanel lp = QueleaApp.get().getMainWindow().getMainPanel().getLivePanel();
if (lp.getDisplayable() instanceof PresentationDisplayable) {
String result = PowerPointHandler.getCurrentSlide();
if (!result.contains("not running") && !result.equals("")) {
if (!result.contains("not running") && !result.isEmpty()) {
int i = Integer.parseInt(result);
presentationPreview.select(i, false);
}
Expand Down Expand Up @@ -364,7 +359,7 @@ public void advance() {
if (QueleaProperties.get().getUsePP()) {
PowerPointHandler.gotoNext();
String result = PowerPointHandler.getCurrentSlide();
if (!result.contains("not running") && !result.equals("")) {
if (!result.contains("not running") && !result.isEmpty()) {
int i = Integer.parseInt(result);
QueleaApp.get().getMainWindow().getMainPanel().getLivePanel().getPresentationPanel().getPresentationPreview().select(i, true);
}
Expand All @@ -379,7 +374,7 @@ public void previous() {
if (QueleaProperties.get().getUsePP()) {
PowerPointHandler.gotoPrevious();
String result = PowerPointHandler.getCurrentSlide();
if (!result.contains("not running") && !result.equals("")) {
if (!result.contains("not running") && !result.isEmpty()) {
int i = Integer.parseInt(result);
QueleaApp.get().getMainWindow().getMainPanel().getLivePanel().getPresentationPanel().getPresentationPreview().select(i, true);
}
Expand Down

0 comments on commit d3fb446

Please sign in to comment.