- Copy buffer is preserved across editing multiple text objects
- Potential memory leak with selection drawing fixed - "Copy Attributes" menu (CTRL-C) now copies all fonts (Plain/B/I/BI) correctly
This commit is contained in:
@@ -36,6 +36,8 @@
|
|||||||
struct Text;
|
struct Text;
|
||||||
|
|
||||||
extern char *BIF_lorem;
|
extern char *BIF_lorem;
|
||||||
|
extern char *copybuf;
|
||||||
|
extern char *copybufinfo;
|
||||||
|
|
||||||
void do_textedit(unsigned short event, short val, char _ascii);
|
void do_textedit(unsigned short event, short val, char _ascii);
|
||||||
void make_editText(void);
|
void make_editText(void);
|
||||||
|
|||||||
@@ -217,8 +217,8 @@ static char findaccent(char char1, char code)
|
|||||||
else return char1;
|
else return char1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *copybuf=NULL;
|
char *copybuf=NULL;
|
||||||
static char *copybufinfo=NULL;
|
char *copybufinfo=NULL;
|
||||||
|
|
||||||
static char *textbuf=NULL;
|
static char *textbuf=NULL;
|
||||||
static CharInfo *textbufinfo=NULL;
|
static CharInfo *textbufinfo=NULL;
|
||||||
@@ -976,11 +976,6 @@ void load_editText(void)
|
|||||||
selboxes= NULL;
|
selboxes= NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
MEM_freeN(copybuf);
|
|
||||||
MEM_freeN(copybufinfo);
|
|
||||||
copybuf= NULL;
|
|
||||||
copybufinfo= NULL;
|
|
||||||
|
|
||||||
textediting= 0;
|
textediting= 0;
|
||||||
|
|
||||||
text_makedisplist(G.obedit);
|
text_makedisplist(G.obedit);
|
||||||
|
|||||||
@@ -2609,6 +2609,15 @@ void copy_attr(short event)
|
|||||||
if(cu1->vfont) cu1->vfont->id.us--;
|
if(cu1->vfont) cu1->vfont->id.us--;
|
||||||
cu1->vfont= cu->vfont;
|
cu1->vfont= cu->vfont;
|
||||||
id_us_plus((ID *)cu1->vfont);
|
id_us_plus((ID *)cu1->vfont);
|
||||||
|
if(cu1->vfontb) cu1->vfontb->id.us--;
|
||||||
|
cu1->vfontb= cu->vfontb;
|
||||||
|
id_us_plus((ID *)cu1->vfontb);
|
||||||
|
if(cu1->vfonti) cu1->vfonti->id.us--;
|
||||||
|
cu1->vfonti= cu->vfonti;
|
||||||
|
id_us_plus((ID *)cu1->vfonti);
|
||||||
|
if(cu1->vfontbi) cu1->vfontbi->id.us--;
|
||||||
|
cu1->vfontbi= cu->vfontbi;
|
||||||
|
id_us_plus((ID *)cu1->vfontbi);
|
||||||
text_to_curve(base->object, 0);
|
text_to_curve(base->object, 0);
|
||||||
|
|
||||||
strcpy(cu1->family, cu->family);
|
strcpy(cu1->family, cu->family);
|
||||||
|
|||||||
@@ -665,6 +665,9 @@ void exit_usiblender(void)
|
|||||||
FTF_End();
|
FTF_End();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (copybuf) MEM_freeN(copybuf);
|
||||||
|
if (copybufinfo) MEM_freeN(copybufinfo);
|
||||||
|
|
||||||
/* undo free stuff */
|
/* undo free stuff */
|
||||||
undo_editmode_clear();
|
undo_editmode_clear();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user