FIX: fix display of long filename in preview-only hint

Change-Id: Ib365a39b262cbf03b14eeefa64e3e46d1b48306e
This commit is contained in:
tao.jin 2022-12-10 17:00:55 +08:00 committed by Lane.Wei
parent b77e96acdd
commit a3730b9236
3 changed files with 24 additions and 1 deletions

View file

@ -979,7 +979,10 @@ bool MainFrame::preview_only_hint()
});
confirm_dlg.update_btn_label(_L("Yes"), _L("No"));
auto filename = wxString((m_plater->get_preview_only_filename()).c_str(), wxConvUTF8);
confirm_dlg.update_text(filename + _L(" will be closed before creating a new model. Do you want to continue?"));
//if size of filename is beyond limit
auto format_filename = confirm_dlg.format_text(filename, FromDIP(240));
confirm_dlg.update_text(format_filename + _L(" will be closed before creating a new model. Do you want to continue?"));
confirm_dlg.on_show();
if (preview_only_to_editor) {
m_plater->new_project();