move clear presets to the panel popup menu

This commit is contained in:
2019-09-09 17:53:31 +02:00
parent 096930b02e
commit 566a4e72a5
3 changed files with 19 additions and 19 deletions

View File

@@ -514,6 +514,18 @@ void NodePanelBrushPreset::init()
break;
case 3: // upload
break;
case 4: // clear presets
{
auto mb = App::I->message_box("Clear Presets", "Do you want to remove all the Brush Presets?", true);
mb->btn_ok->m_text->set_text("Yes");
mb->btn_cancel->m_text->set_text("No");
mb->btn_ok->on_click = mb->on_submit = [this, mb](Node*) {
App::I->presets->clear_brushes();
App::I->presets->save();
mb->destroy();
};
break;
}
}
popup->destroy();
};