jkall / qgis-midvatten-plugin

Midvatten plugin for QGIS
23 stars 8 forks source link

Can't add obs_points #349

Closed User-1a closed 8 months ago

User-1a commented 1 year ago

I've got a database set up and added the default layers to my project but I can't add new obs_points. I toggled editing on that layer and clicked on a location to add a point but when the Feature Attributes window pops up the OK button is greyed out. I thought only the obsid was required, so I tried putting data in every field but it was still greyed out. I checked the permissions on the sqlite database file (I'm using Windows 10) and made sure my user had read/write/modify permission and restarted QGIS but I still can't add features to the obs_points layer. Am I missing something? I can edit other layers I created in this project. Any help/suggestions would be much appreciated!

HenrikSpa commented 1 year ago

Hi! What's your version of QGIS and Midvatten plugin?

User-1a commented 1 year ago

Hi, I'm using QGIS 3.28.6-Firenze and the Midvatten plugin is 1.7.3

HenrikSpa commented 1 year ago

This error seem to appear and disappear with different QGIS versions. I think the problem happens because there is three entries for "obsid" in the form layout.

Here is a short solution (until next Midvatten plugin version) which worked for me:

  1. Open Properties-window for layer obs_points and go to Attributes form: image
  2. In the form layout section, open "general" and "observation point". Drag "obsid" to the top above section "general" image
  3. Open sections "general", "xyz" and "management", mark the groups named "observations points" and click the remove button. image

    Now there is only one entry for obsid, and when I added a new point and gave it an obsid I could now save it.

This is probably the solution I introduce in the next plugin version.

Regards, Henrik

User-1a commented 1 year ago

Thank you Henrik! I never would have figured that out for myself. It's working for me now.

Jono

On Mon, Aug 21, 2023, 03:13 HenrikSpa @.***> wrote:

This error seem to appear and disappear with different QGIS versions. I think the problem happens because there is three entries for "obsid".

Here is a short solution (until next Midvatten plugin version) which worked for me:

  1. Open Properties-window for layer obs_points and go to Attributes form: [image: image] https://user-images.githubusercontent.com/17615137/261944586-85989544-3a22-4a77-8ec2-b76d73369a3f.png
  2. In the form layout section, open "general" and "observation point". Drag "obsid" to the top above section "general" [image: image] https://user-images.githubusercontent.com/17615137/261945104-eb7a73c9-a654-4971-8c47-47b2a9bf2c16.png
  3. Open sections "general", "xyz" and "management", mark the groups named "observations points" and click the remove button. [image: image] https://user-images.githubusercontent.com/17615137/261945343-992e571f-6b73-42ad-b7bc-4b299cadc8ef.png

Now there is only one entry for obsid, and when I added a new point and gave it an obsid I could now save it.

This is probably the solution I introduce in the next plugin version.

Regards, Henrik

— Reply to this email directly, view it on GitHub https://github.com/jkall/qgis-midvatten-plugin/issues/349#issuecomment-1685777223, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5AIZRJSZMZGYA6MSB4GBPLXWMDC5ANCNFSM6AAAAAA3VZPTOI . You are receiving this because you authored the thread.Message ID: @.***>

HenrikSpa commented 8 months ago

Solved in version 1.7.11.