[jsword-svn] r1784 - trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Thu Mar 20 04:40:29 MST 2008


Author: dmsmith
Date: 2008-03-20 04:40:27 -0700 (Thu, 20 Mar 2008)
New Revision: 1784

Modified:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java
Log:
fixed a first use bug

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java	2008-03-18 12:32:54 UTC (rev 1783)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/DisplaySelectPane.java	2008-03-20 11:40:27 UTC (rev 1784)
@@ -114,7 +114,7 @@
         biblePicker = new ParallelBookPicker(BookFilters.getBibles(), BookComparators.getInitialComparator());
         biblePicker.addBookListener(this);
         selected = biblePicker.getBooks();
-        if (selected.length > 0)
+        if (selected != null && selected.length > 0)
         {
             selected[0].addIndexStatusListener(isl);
             key = selected[0].createEmptyKeyList();
@@ -257,7 +257,7 @@
      */
     public void clear()
     {
-        setKey(selected.length == 0 ? new RocketPassage() : selected[0].createEmptyKeyList());
+        setKey(selected == null || selected.length == 0 ? new RocketPassage() : selected[0].createEmptyKeyList());
         setTitle(CLEAR);
     }
 
@@ -311,7 +311,7 @@
      */
     public void doSearchAction()
     {
-        if (selected == null)
+        if (selected == null || selected.length == 0)
         {
             noBookInstalled();
             return;
@@ -407,7 +407,7 @@
      */
     public void doIndex()
     {
-        if (selected == null)
+        if (selected == null || selected.length == 0)
         {
             noBookInstalled();
             return;
@@ -422,7 +422,7 @@
      */
     private void updateDisplay()
     {
-        if (selected == null)
+        if (selected == null || selected.length == 0)
         {
             noBookInstalled();
             return;
@@ -449,9 +449,8 @@
 
     public void setKey(String newKey)
     {
-        if (selected == null)
+        if (selected == null || selected.length == 0)
         {
-            noBookInstalled();
             return;
         }
 
@@ -640,7 +639,7 @@
 
         enableComponents();
 
-        if (selected == null)
+        if (selected == null || selected.length == 0)
         {
             noBookInstalled();
             return;




More information about the jsword-svn mailing list