Changed title for BulkExportDialog

This commit is contained in:
David Kocik 2025-02-10 10:18:06 +01:00 committed by Lukas Matena
parent 4bb316eb25
commit 7153ac4ee7
3 changed files with 8 additions and 7 deletions

View File

@ -200,15 +200,16 @@ void BulkExportDialog::Item::update_valid_bmp()
m_valid_bmp->SetBitmap(*get_bmp_bundle(get_bmp_name(m_status))); m_valid_bmp->SetBitmap(*get_bmp_bundle(get_bmp_name(m_status)));
} }
BulkExportDialog::BulkExportDialog(const std::vector<std::pair<int, std::optional<fs::path>>> &paths): BulkExportDialog::BulkExportDialog(const std::vector<std::pair<int, std::optional<fs::path>>> &paths, const wxString& title):
DPIDialog( DPIDialog(
nullptr, nullptr,
wxID_ANY, wxID_ANY,
_L("Export beds"), title,
wxDefaultPosition, wxDefaultPosition,
wxSize(45 * wxGetApp().em_unit(), 5 * wxGetApp().em_unit()), wxSize(45 * wxGetApp().em_unit(), 5 * wxGetApp().em_unit()),
wxDEFAULT_DIALOG_STYLE | wxICON_WARNING wxDEFAULT_DIALOG_STYLE | wxICON_WARNING
) )
, m_title(title)
{ {
this->SetFont(wxGetApp().normal_font()); this->SetFont(wxGetApp().normal_font());
@ -254,7 +255,7 @@ void BulkExportDialog::accept()
if (has_warnings()) { if (has_warnings()) {
MessageDialog dialog(nullptr, MessageDialog dialog(nullptr,
_L("Some of the selected files already exist. Do you want to replace them?"), _L("Some of the selected files already exist. Do you want to replace them?"),
_L("Export beds"), wxYES_NO | wxICON_QUESTION); m_title, wxYES_NO | wxICON_QUESTION);
if (dialog.ShowModal() == wxID_NO) if (dialog.ShowModal() == wxID_NO)
return; return;
} }

View File

@ -79,10 +79,10 @@ private:
// This must be a unique ptr, because Item does not have copy nor move constructors. // This must be a unique ptr, because Item does not have copy nor move constructors.
std::vector<std::unique_ptr<Item>> m_items; std::vector<std::unique_ptr<Item>> m_items;
wxFlexGridSizer*m_sizer{nullptr}; wxFlexGridSizer*m_sizer{nullptr};
wxString m_title;
public: public:
BulkExportDialog(const std::vector<std::pair<int, std::optional<boost::filesystem::path>>> &paths); BulkExportDialog(const std::vector<std::pair<int, std::optional<boost::filesystem::path>>> &paths, const wxString& title);
std::vector<std::pair<int, std::optional<boost::filesystem::path>>> get_paths() const; std::vector<std::pair<int, std::optional<boost::filesystem::path>>> get_paths() const;
bool has_warnings() const; bool has_warnings() const;

View File

@ -5948,7 +5948,7 @@ void Plater::export_all_gcodes(bool prefer_removable) {
paths.emplace_back(print_index, output_file); paths.emplace_back(print_index, output_file);
} }
BulkExportDialog dialog{paths}; BulkExportDialog dialog{paths, _L("Export beds")};
if (dialog.ShowModal() != wxID_OK) { if (dialog.ShowModal() != wxID_OK) {
return; return;
} }
@ -6596,7 +6596,7 @@ void Plater::connect_gcode_all() {
paths.emplace_back(print_index, filename_fixed); paths.emplace_back(print_index, filename_fixed);
} }
BulkExportDialog dialog{paths}; BulkExportDialog dialog{paths, _L("Send all to Connect")};
if (dialog.ShowModal() != wxID_OK) { if (dialog.ShowModal() != wxID_OK) {
return; return;
} }