Commit b97a980
1 parent af8fb04 commit b97a980
File tree
2 files changed
+7
-5
lines changed- src/gui/attributetable
2 files changed
+7
-5
lines changedLines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
200 |
| - | |
| 200 | + | |
201 | 201 |
| |
202 | 202 |
| |
203 | 203 |
| |
| |||
225 | 225 |
| |
226 | 226 |
| |
227 | 227 |
| |
228 |
| - | |
| 228 | + | |
| 229 | + | |
229 | 230 |
| |
230 | 231 |
| |
231 |
| - | |
| 232 | + | |
| 233 | + | |
232 | 234 |
| |
233 | 235 |
| |
234 | 236 |
| |
| |||
412 | 414 |
| |
413 | 415 |
| |
414 | 416 |
| |
415 |
| - | |
| 417 | + | |
416 | 418 |
| |
417 | 419 |
| |
418 | 420 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
307 | 307 |
| |
308 | 308 |
| |
309 | 309 |
| |
310 |
| - | |
| 310 | + | |
311 | 311 |
| |
312 | 312 |
| |
313 | 313 |
| |
|
7 commit comments
NathanW2 commentedon May 22, 2017
Win!
m-kuhn commentedon May 22, 2017
Nice
elpaso commentedon May 22, 2017
Nice!
luipir commentedon May 22, 2017
elegant solution, but some questions:
when featureAdded would be called to trigger model reset? the end of editing? the end of coping, the end of something. Is it a way to move control outside the the MV qt model to a business function level?
nyalldawson commentedon May 22, 2017
feature added is used in two places - one is when the table is already visible and a new feature is actually added to the layer. The other is for every feature added to the table when the table is being loaded. This is when it's being used whole the model is being reset.
I'd say it's more of a workaround qt's model handling. I think any rowsAboutToBeInserted, ... should always be ignored if a model is in the process of being reset. But it seems this isn't the case, so adding the thousands of features when loading the table triggers a whole bunch of expensive sort handling after every feature is added.
luipir commentedon May 22, 2017
+1 for me :)
gioman commentedon May 22, 2017
Hi @nyalldawson
with your patch
2.18.8
rendering time:
real 0m38.663s
user 0m33.572s
sys 0m1.244s
so... quite slower in rendering my test 758k ploygon layer.
table:
it took 27 seconds to open the whole table, which is 10 seconds slower
than on 2.14.4
cheers!