Skip to content

Commit 52b174e

Browse files
committed
Fix [note] colour not updating, fix messbox assertion
1 parent e137059 commit 52b174e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Source/Objects/MessboxObject.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,10 @@ class MessboxObject final : public ObjectBase
175175

176176
void hideEditor() override
177177
{
178-
cnv->grabKeyboardFocus();
179-
repaint();
178+
if(cnv->isVisible()) {
179+
cnv->grabKeyboardFocus();
180+
repaint();
181+
}
180182
}
181183

182184
bool isEditorShown() override

Source/Objects/NoteObject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ class NoteObject final : public ObjectBase, public AsyncUpdater {
179179
{
180180
auto const newFont = getFont();
181181

182+
noteEditor.setColour(TextEditor::textColourId, Colour::fromString(primaryColour.toString()));
182183
noteEditor.setIndents(0, 2);
183184
noteEditor.setFont(newFont);
184185
noteEditor.setText(currentNoteText);
@@ -192,7 +193,6 @@ class NoteObject final : public ObjectBase, public AsyncUpdater {
192193
noteEditor.setJustification(Justification::topRight);
193194
}
194195

195-
noteEditor.setColour(TextEditor::textColourId, Colour::fromString(primaryColour.toString()));
196196
getLookAndFeel().setColour(Label::textWhenEditingColourId, cnv->editor->getLookAndFeel().findColour(Label::textWhenEditingColourId));
197197
getLookAndFeel().setColour(Label::textColourId, cnv->editor->getLookAndFeel().findColour(Label::textColourId));
198198
}

0 commit comments

Comments
 (0)