mbari-org / vars-annotation

Video Annotation Application for MBARI's Media Management (M3) software stack
https://docs.mbari.org/vars-annotation/
Apache License 2.0
16 stars 6 forks source link

concept search fails #10

Closed lonnylundsten closed 2 years ago

lonnylundsten commented 6 years ago

Concept search fails and, although I can't pinpoint what is causing the fail, it seems as if refreshing the DB in the Bulk Editor window causes the issue. After I refresh the DB in the "Bulk Editor' window, when bulk changing Activity, searching and entering new concepts fails. The solution is to restart vars.

lonnylundsten commented 6 years ago

When this happens, the concept defaults to 1-gallon paint bucket. No other concepts can be selected.

hohonuuli commented 6 years ago

@lonnylundsten You'll need to demo this issue to me. I'm not clear on what's actually happening. Most likely we'll have to wait until Monday to review this.

hohonuuli commented 6 years ago

Wierd behavior the fix was:

@@ -231,12 +232,10 @@ public class AnnotationEditorPaneController {
         toolBox.getServices()
                 .getConceptService()
                 .findAllNames()
-                .thenApply(names -> {
-                    ObservableList<String> cns = FXCollections.observableArrayList(names);
-                    Platform.runLater(() -> {
-                        conceptComboBox.setItems(cns);
-                    });
-                    return null;
+                .thenAccept(names -> {
+
+                    FilteredList<String> cns = new FilteredList<>(FXCollections.observableArrayList(names));
+                    Platform.runLater(() -> conceptComboBox.setItems(cns));
                 });
     }
hohonuuli commented 6 years ago

Just to clarify, when @lonnylundsten used the main refresh button. The main concept search combobox would not run a search. It would just pop up the items list and show the tool tip, but no filtering was occurring. It looks like I was setting the items correctly. Running tests with similar usage demonstrated that it worked. When I wrap it in a filtered list, the FilteredComboboxDecorator does less work, which seemed to fix the issue although I'm not sure why we were running into it in the first place.

lonnylundsten commented 6 years ago

I just fired up the new release - the refresh button still causes the concept search to reset to '1-gallon paint bucket’. So this bug is not fixed yet. Its behaving just the same.

hohonuuli commented 6 years ago

As a temporary workaround, I've disable the refresh in AnnotationEditorPaneController. So the comboBox doesn't get refreshed, but it doens't stop working either.

hohonuuli commented 6 years ago

This workaround was applied in alpha-4. Moving this to the next alpha for resolution