Skip to content

Commit

Permalink
Changed title for BulkExportDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
kocikdav authored and lukasmatena committed Feb 17, 2025
1 parent 4bb316e commit 7153ac4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/slic3r/GUI/BulkExportDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,16 @@ void BulkExportDialog::Item::update_valid_bmp()
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(
nullptr,
wxID_ANY,
_L("Export beds"),
title,
wxDefaultPosition,
wxSize(45 * wxGetApp().em_unit(), 5 * wxGetApp().em_unit()),
wxDEFAULT_DIALOG_STYLE | wxICON_WARNING
)
, m_title(title)
{
this->SetFont(wxGetApp().normal_font());

Expand Down Expand Up @@ -254,7 +255,7 @@ void BulkExportDialog::accept()
if (has_warnings()) {
MessageDialog dialog(nullptr,
_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)
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/slic3r/GUI/BulkExportDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ class BulkExportDialog : public DPIDialog
// This must be a unique ptr, because Item does not have copy nor move constructors.
std::vector<std::unique_ptr<Item>> m_items;
wxFlexGridSizer*m_sizer{nullptr};

wxString m_title;
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;
bool has_warnings() const;

Expand Down
4 changes: 2 additions & 2 deletions src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5948,7 +5948,7 @@ void Plater::export_all_gcodes(bool prefer_removable) {
paths.emplace_back(print_index, output_file);
}

BulkExportDialog dialog{paths};
BulkExportDialog dialog{paths, _L("Export beds")};
if (dialog.ShowModal() != wxID_OK) {
return;
}
Expand Down Expand Up @@ -6596,7 +6596,7 @@ void Plater::connect_gcode_all() {
paths.emplace_back(print_index, filename_fixed);
}

BulkExportDialog dialog{paths};
BulkExportDialog dialog{paths, _L("Send all to Connect")};
if (dialog.ShowModal() != wxID_OK) {
return;
}
Expand Down

0 comments on commit 7153ac4

Please sign in to comment.