uDIG
  1. uDIG
  2. UDIG-1547

Copy and paste features do not refresh automatically the Table View

    Details

    • Type: Bug Bug
    • Status: Reopened Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: UDIG 1.2.M5
    • Fix Version/s: UDIG 1.3.1
    • Component/s: application
    • Labels:
      None
    • Environment:
      Linux Kubuntu 64 bits - Windows

      Description

      Copy and paste polygons from a layer into one other with the Table View opened.
      The features are copied and:
      1. the Map view is refreshed properly
      2. the Table view is not refreshed
      If you want to see the new features in the Table view you need to select a different layer and then going back to the original one.

        Activity

        Hide
        Silvia Franceschi added a comment -
        Copy and paste also do not update the Save button.
        Show
        Silvia Franceschi added a comment - Copy and paste also do not update the Save button.
        Hide
        Jody Garnett added a comment -
        I think I found it; the code makes use of the drag and drop code. And that code was incorrectly checking for the old MapEditor. I will try and fix.
        Show
        Jody Garnett added a comment - I think I found it; the code makes use of the drag and drop code. And that code was incorrectly checking for the old MapEditor. I will try and fix.
        Hide
        Levi Putna added a comment -
        Ok looks like the CopyFeaturesCommand was not firing off the the change event on the layer. This should now work, can someone test that the TableView is reloading correctly after a copy past.
        Show
        Levi Putna added a comment - Ok looks like the CopyFeaturesCommand was not firing off the the change event on the layer. This should now work, can someone test that the TableView is reloading correctly after a copy past.
        Hide
        Jody Garnett added a comment -
        Okay the fix does fix the tableview; but it also marks the map as dirty. I am going to try and add events to UDIGSimpleFeatureStore as an alternate idea.
        Show
        Jody Garnett added a comment - Okay the fix does fix the tableview; but it also marks the map as dirty. I am going to try and add events to UDIGSimpleFeatureStore as an alternate idea.
        Hide
        Jody Garnett added a comment -
        Okay adding events worked; I have tested with MemoryDataStore as per walkthrough 2. I will ask moovida to test against shapefile or something.

        After this fix UDIGSimpleFeatureStore is issuing feature events (we are not relying on the geotools datastore implementation to do it).

        The only wrinkle I ran into was problems with calculating the bounds of the features being added; the TableView has some very complicate code to try and update "only" the changed stuff. As part of that it takes the bounds from the event. And then asks the featureSource for all the features in that area!

        So basically it went to a lot of trouble to obtain a collection of features that includes all the features we just added. I was passing in the Filter listing all the features we just added (so perhaps we could make this code easier).
        Show
        Jody Garnett added a comment - Okay adding events worked; I have tested with MemoryDataStore as per walkthrough 2. I will ask moovida to test against shapefile or something. After this fix UDIGSimpleFeatureStore is issuing feature events (we are not relying on the geotools datastore implementation to do it). The only wrinkle I ran into was problems with calculating the bounds of the features being added; the TableView has some very complicate code to try and update "only" the changed stuff. As part of that it takes the bounds from the event. And then asks the featureSource for all the features in that area! So basically it went to a lot of trouble to obtain a collection of features that includes all the features we just added. I was passing in the Filter listing all the features we just added (so perhaps we could make this code easier).

          People

          • Assignee:
            Jody Garnett
            Reporter:
            Silvia Franceschi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: