Skip to content

Commit a98ed43

Browse files
committed
wms: catch service exception on GetFeatureInfo and use feature extent if there's no geometry
1 parent 19f0666 commit a98ed43

File tree

6 files changed

+229
-202
lines changed

6 files changed

+229
-202
lines changed

src/app/qgsidentifyresultsdialog.cpp

+27-25
Original file line numberDiff line numberDiff line change
@@ -89,35 +89,37 @@ void QgsWebView::contextMenuEvent( QContextMenuEvent *e )
8989
// QgsWebView size:
9090
// ---------------
9191
//
92-
// 1) QTreeWidget is not able to scroll continuously through the content of large widgets// iserted into items via setItemWidget, it always jumps to the top of next item
93-
// and it is not able to scroll to the bottom of an inserted large widget (until
94-
// the QTreeWidget itself is large enough to show the whole inserted widget).
95-
// => We have to keep the height of QgsWebView smaller than the height of QTreeWidget
96-
// so that a user can see it entire, even if this height is smaller than QgsWebView
97-
// content (i.e. QgsWebView scroolbar is added). We make it even a bit smaller so
98-
// that a user can see a bit of context (items above/below) when scrolling which
99-
// is more pleasant.
92+
// 1) QTreeWidget is not able to scroll continuously through the content of large widgets
93+
// inserted into items via setItemWidget, it always jumps to the top of next
94+
// item and it is not able to scroll to the bottom of an inserted large
95+
// widget (until the QTreeWidget itself is large enough to show the whole
96+
// inserted widget). => We have to keep the height of QgsWebView smaller
97+
// than the height of QTreeWidget so that a user can see it entire, even if
98+
// this height is smaller than QgsWebView content (i.e. QgsWebView scroolbar
99+
// is added). We make it even a bit smaller so that a user can see a bit of
100+
// context (items above/below) when scrolling which is more pleasant.
100101
//
101-
// 2) contentsSize() is 0,0 until a page is loaded. If there are no external resources
102-
// (like images) used, contentsSize() is available immediately after setHtml(),
103-
// otherwise the contentSize() is 0,0 until the page is loaded and contentsSizeChanged ()
104-
// is emited.
102+
// 2) contentsSize() is 0,0 until a page is loaded. If there are no external
103+
// resources (like images) used, contentsSize() is available immediately
104+
// after setHtml(), otherwise the contentSize() is 0,0 until the page is
105+
// loaded and contentsSizeChanged () is emited.
105106
//
106-
// 3) If QgsWebView is resized (on page load) after it was inserted into QTreeWidget,
107-
// the row does not reflect that change automaticaly and consecutive resize
108-
// of QTreeWidget will cause to shrink QgsWebView to the original row height.
109-
// That is expected, Qt: "setItemWidget() should only be used to display static
110-
// content...
111-
// => we must not change QgsWebView size after it was inserted to QTreeWidget
107+
// 3) If QgsWebView is resized (on page load) after it was inserted into
108+
// QTreeWidget, the row does not reflect that change automaticaly and
109+
// consecutive resize of QTreeWidget will cause to shrink QgsWebView to the
110+
// original row height. That is expected, Qt: "setItemWidget() should only
111+
// be used to display static content... => we must not change QgsWebView
112+
// size after it was inserted to QTreeWidget
112113

113114
// TODO(?): Sometimes it may happen that if multiple QgsWebView are inserted to
114-
// QTreeWidget for the first time, and both share the same external source (image)
115-
// the layout gets somehow confused - wrong positions, overlapped (Qt bug?)
116-
// until next QTreeWidget resize.
117-
118-
// TODO(?): if the results dialog is resized to smaller heigh, existing QgsWebView
119-
// are not (and must not be!) resized and scrolling becomes a bit unpleasant
120-
// until next identify. AFAIK it could only be solved using QItemDelegate.
115+
// QTreeWidget for the first time, and both share the same external source
116+
// (image) the layout gets somehow confused - wrong positions, overlapped (Qt
117+
// bug?) until next QTreeWidget resize.
118+
119+
// TODO(?): if the results dialog is resized to smaller heigh, existing
120+
// QgsWebView are not (and must not be!) resized and scrolling becomes a bit
121+
// unpleasant until next identify. AFAIK it could only be solved using
122+
// QItemDelegate.
121123

122124
// size hint according to content
123125
QSize QgsWebView::sizeHint() const

0 commit comments

Comments
 (0)