Fixed update of the project name in the status line in case the name

of the project contains dots.
This commit is contained in:
bubnikv 2019-05-20 14:30:55 +02:00
parent 537c3714f2
commit cd1a445c83

View file

@ -143,7 +143,9 @@ void MainFrame::update_title()
wxString title = wxEmptyString; wxString title = wxEmptyString;
if (m_plater != nullptr) if (m_plater != nullptr)
{ {
wxString project = from_path(into_path(m_plater->get_project_filename()).stem()); // m_plater->get_project_filename() produces file name including path, but excluding extension.
// Don't try to remove the extension, it would remove part of the file name after the last dot!
wxString project = from_path(into_path(m_plater->get_project_filename()).filename());
if (!project.empty()) if (!project.empty())
title += (project + " - "); title += (project + " - ");
} }