aboutsummaryrefslogtreecommitdiff
path: root/src/sc_editor.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-11 16:56:56 +0100
committerThomas White <taw@physics.org>2018-03-11 16:57:17 +0100
commit6158d0d7411a6718fab01873109067b227bfa1b8 (patch)
tree63a534c6f18c1d191bc8e77c755ea64eca6feb50 /src/sc_editor.c
parent01c0a135250841ed2a5f748432dae8f0052c6874 (diff)
Avoid creating extra ImageStores
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r--src/sc_editor.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c
index cec0186..3972f02 100644
--- a/src/sc_editor.c
+++ b/src/sc_editor.c
@@ -2041,6 +2041,15 @@ void sc_editor_set_scale(SCEditor *e, int scale)
}
+void sc_editor_set_imagestore(SCEditor *e, ImageStore *is)
+{
+ if ( e->is != NULL ) {
+ fprintf(stderr, "WARNING: Changing imagestore\n");
+ }
+ e->is = is;
+}
+
+
SCEditor *sc_editor_new(SCBlock *scblocks, SCBlock **stylesheets,
PangoLanguage *lang, const char *storename)
{
@@ -2057,7 +2066,7 @@ SCEditor *sc_editor_new(SCBlock *scblocks, SCBlock **stylesheets,
sceditor->log_h = 100;
sceditor->border_offs_x = 0;
sceditor->border_offs_y = 0;
- sceditor->is = imagestore_new(storename);
+ sceditor->is = NULL;
sceditor->slidenum = 0;
sceditor->min_border = 0.0;
sceditor->top_editable = 0;