-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory dataset group and possibility to persist it #37389
Conversation
src/app/qgisapp.cpp
Outdated
@@ -12854,31 +12856,36 @@ bool QgisApp::checkMemoryLayers() | |||
} | |||
else if ( it.value() && it.value()->isTemporary() ) | |||
hasTemporaryLayers = true; | |||
else if ( it.value() && it.value()->type() == QgsMapLayerType::MeshLayer ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this, you should override QgsMapLayer::isTemporary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, but, here I prefer keep the distinguish between mesh layer and other type because the logic is not exactly the same : for other, all the mesh is temporary, for mesh layer, only some dataset groups.
@nirvn mind doing a UI review of this? One issue I can see immediately is that the calculator isn't using the correct font in the editor, so we're seeing the qt 5.14 issue with the ridiculous font spacing... |
In the GIF, It is built with Qt 5.12.8. Maybe is it the space with a variable, for example "vitesse ms". In that case, it is due to the data, the name of the dataset group has the unity at the end, separated with several spaces. |
I have already reviewed this privately in vcloarec#22 |
Personally it looks odd to me to show the memory indicator icon in the mesh calculator dialog. Why is it needed there? |
@nyalldawson Memory dataset groups are not persitent and will be removed after closing the project. User could need to know this dataset group is not persistent, especially if this dataset is used to calculate another one. For now, there is no consequences because there is no dependence after the creation of the new one, but there will be soon... But I agree, it is not the best UI design, especially in the calculator dialog. Maybe it will be better with icon on the right? |
4b067ab
to
e37187a
Compare
Please give me some time to review the UI. One question: why are those virtual datasets have to be non-persistent? |
Those "virtual" dataset group are stored in memory, not and file, so can't be retrieved after closing the project. For information, there is an upcoming PR with "on the fly" dataset group, and those new dataset groups will be calculated on real time, and some (those that not depend on temporary dataset) could be persistent. |
@vcloarec , couldn't you simply store the formula and re-compute it upon re-opening the project? |
The "on the fly" will store the formula and calculate when needed. For the "memory", the formula is not stored, it is not the concept for now. But it could be later... For now, "memory" are just temporary dataset that could be persist in file if needed (as "on the fly") |
@vcloarec , I'm wondering whether this temporary vs persistent virtual dataset adds a level of UI/UX complexity without much to gain from. I.e., if those virtual datasets would all be persistent, you wouldn't need to have the memory icon anywhere, etc. |
I propose to merge this as it is, and once the on-the-fly PR lands, we can clean the UI in one go? |
Could we at least remove all memory icons from this PR? That can't stay in any case. |
With the last commit, the memory icon is removed from the dataset active widget and from the mesh calculator. @nirvn , let me know if it is ok, or do I need to remove ALL? |
talked with @nirvn , agreed on the plan forward, so we can merge this one and improve in the on-the-fly dataset followup PR. |
[FEATURE] Introduces memory dataset groups for mesh layer. These dataset groups are temporary and are not kept when the project is closed. Memory dataset groups can be created from the mesh calculator with a new option. Allows the possibility to remove or save these memory dataset groups to a file with specified driver.
This PR introduce memory dataset groups for mesh layer. These dataset groups are temporary and are not kept when the project is closed.
Memory dataset groups can be created from the mesh calculator with a new option.
This PR also allows the possibility to remove or save these memory dataset groups to a file with specified driver.