mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
BUG-1716: As first UpdateTextBoxFormat was called, and than the font was disposed, we tried to draw something with a disposed font. [skip ci]
This commit is contained in:
parent
0c02475feb
commit
4e45ca651e
1 changed files with 4 additions and 4 deletions
|
@ -173,15 +173,15 @@ namespace Greenshot.Drawing {
|
||||||
|
|
||||||
void TextContainer_FieldChanged(object sender, FieldChangedEventArgs e) {
|
void TextContainer_FieldChanged(object sender, FieldChangedEventArgs e) {
|
||||||
if (_textBox.Visible) {
|
if (_textBox.Visible) {
|
||||||
UpdateTextBoxFormat();
|
|
||||||
_textBox.Invalidate();
|
_textBox.Invalidate();
|
||||||
} else {
|
|
||||||
UpdateFormat();
|
|
||||||
//Invalidate();
|
|
||||||
}
|
}
|
||||||
_font.Dispose();
|
_font.Dispose();
|
||||||
_font = null;
|
_font = null;
|
||||||
fontInvalidated = true;
|
fontInvalidated = true;
|
||||||
|
UpdateTextBoxFormat();
|
||||||
|
if (_textBox.Visible) {
|
||||||
|
_textBox.Invalidate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnDoubleClick() {
|
public override void OnDoubleClick() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue