Skip to content

Commit

Permalink
UX - Add a warning when we set PG layer in Locate by layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Nov 30, 2023
1 parent f0821e7 commit 043215b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lizmap/forms/locate_layer_edition.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
__license__ = 'GPL version 3'
__email__ = '[email protected]'

from lizmap.tools import is_vector_pg

CLASS = load_ui('ui_form_locate_layer.ui')

Expand Down Expand Up @@ -56,6 +57,8 @@ def check_layer_wfs(self):
self.show_error(tr('A layer is mandatory.'))
return

self.label_layer_in_pg.setVisible(is_vector_pg(layer))

not_in_wfs = self.is_layer_in_wfs(layer)
self.show_error(not_in_wfs)

Expand Down
10 changes: 10 additions & 0 deletions lizmap/resources/ui/ui_form_locate_layer.ui
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
<string>Locate by layer</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_layer_in_pg">
<property name="text">
<string>The current selected layer is stored in PostgreSQL, you can have better performance by not using the &quot;Locate by layer&quot; tool, but instead &quot;Lizmap search&quot;, link at the top of the table when you close this dialog.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
Expand Down

0 comments on commit 043215b

Please sign in to comment.