-
-
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
changes to annotations mark the project dirty (fixes #7586) #2506
Conversation
How are they saved to the project eventually? |
There appears to be no model. Annotations are derived from Annotations are saved by |
What do you think about adding it to the |
That actually was my first approach. But then every project containing annotations was dirty, because during the loading of a project I agree that annotations might be changed from a plugin or somewhere else and we want to catch that, too. I will rework this PR and come back to you then. |
If you have any ideas left, ok, go for it. |
Well, it was a dead end 😞 So please merge this as it is. Maybe we should take a mental note to rewrite the annotation code when going for the next major release? |
@SebDieBln I'd also like to see this. One issue is that it's locked up in GUI and not accessible from CORE... which causes problems when trying to use annotations in composer maps. |
Add a
note, that's what I'll grep for when it's time :) |
this includes adding, editing, moving, resizing and deleting
8cbc535
to
30d7795
Compare
@@ -141,6 +142,7 @@ void QgsMapToolAnnotation::keyPressEvent( QKeyEvent* e ) | |||
mCanvas->scene()->removeItem( sItem ); | |||
delete sItem; | |||
mCanvas->setCursor( neutralCursor ); | |||
QgsProject::instance()->setDirty( true ); // TODO QGIS3: Rework the whole annotation code to be MVC compliant, see PR #2506 |
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.
Added the note with a reference to this PR.
changes to annotations mark the project dirty (fixes #7586)
Thanks a lot @SebDieBln |
Changes to annotations (adding, editing, resizing, moving, deleting) now mark the project dirty. So these changes can't just vanish unnoticed when closing the project.
When testing please keep in mind Redmine # 13887, e.g. make sure to have at least one layer in the project.