Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-01-06 07:35:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-06 07:35:57 +0300
commitbba20eb5ae5e20a1ce4dcf74fa50bf6971315423 (patch)
tree0b7bd85c4f5246ab469def624f97be60771857b2 /source/blender/editors/gpencil
parent68b931b03f8ed0e082850192478f79513063dd62 (diff)
use ED_markers_get_first_selected() where possible, simplify ed_marker_rename_exec
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/editaction_gpencil.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c
index d76e5fcf17c..0ee8b914205 100644
--- a/source/blender/editors/gpencil/editaction_gpencil.c
+++ b/source/blender/editors/gpencil/editaction_gpencil.c
@@ -668,15 +668,10 @@ static short mirror_gpf_marker (bGPDframe *gpf, Scene *scene)
}
else {
/* try to find a marker */
- for (marker= scene->markers.first; marker; marker=marker->next) {
- if (marker->flag & SELECT) {
- initialised = 1;
- break;
- }
+ marker= ED_markers_get_first_selected(&scene->markers);
+ if(marker) {
+ initialised= 1;
}
-
- if (initialised == 0)
- marker = NULL;
}
}