Fix delete message for last style
This commit is contained in:
parent
872bccb530
commit
1ba66a0e71
1 changed files with 3 additions and 1 deletions
|
@ -1532,7 +1532,9 @@ void GLGizmoEmboss::draw_delete_style_button() {
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
const FontManager::Item &style = m_font_manager.get_activ_style();
|
const FontManager::Item &style = m_font_manager.get_activ_style();
|
||||||
std::string style_name = style.font_item.name;
|
std::string style_name = style.font_item.name;
|
||||||
std::string tooltip = GUI::format(_L("Delete \"%1%\" style."), style_name);
|
std::string tooltip = can_delete ?
|
||||||
|
GUI::format(_L("Delete \"%1%\" style."), style_name) :
|
||||||
|
GUI::format(_L("Can't delete \"%1%\". It is last style."), style_name) ;
|
||||||
ImGui::SetTooltip("%s", tooltip.c_str());
|
ImGui::SetTooltip("%s", tooltip.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue