Fix save color in theme editor.

This commit is contained in:
John Preston 2019-08-20 16:44:31 +03:00
parent ef7087348a
commit dd136350fb
1 changed files with 5 additions and 2 deletions

View File

@ -704,11 +704,14 @@ void EditColorBox::fieldSubmitted() {
}
void EditColorBox::saveColor() {
_cancelCallback = Fn<void()>();
const auto weak = make_weak(this);
_cancelCallback = nullptr;
if (_saveCallback) {
_saveCallback(_new.toRgb());
}
closeBox();
if (weak) {
closeBox();
}
}
void EditColorBox::updateHSVFields() {