Skip to content

Commit e873612

Browse files
committed
Fix compile errors
1 parent ad27324 commit e873612

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/libslic3r/Preset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ void Preset::save(const DynamicPrintConfig* parent_config)
595595
else {
596596
ConfigOptionVectorBase* opt_vec_src = static_cast<ConfigOptionVectorBase*>(opt_src);
597597
ConfigOptionVectorBase* opt_vec_dst = static_cast<ConfigOptionVectorBase*>(opt_dst);
598-
ConfigOptionVectorBase* opt_vec_inherit = static_cast<ConfigOptionVectorBase*>(parent_config->option(option));
598+
const ConfigOptionVectorBase* opt_vec_inherit = static_cast<const ConfigOptionVectorBase*>(parent_config->option(option));
599599
if (opt_vec_src->size() == 1)
600600
opt_dst->set(opt_src);
601601
else if (key_set1->find(option) != key_set1->end()) {

src/slic3r/GUI/NotificationManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,7 +2017,7 @@ void NotificationManager::set_all_slicing_errors_gray(bool g, int plate_id)
20172017
{
20182018
for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
20192019
if (notification->get_type() == NotificationType::SlicingError) {
2020-
if (auto obj_notif = dynamic_cast<ObjectIDNotification*>(notification.get()); obj_notif->plate_id == plate_id) {
2020+
if (auto obj_notif = dynamic_cast<ObjectIDNotification*>(notification.get()); plate_id == -1 || obj_notif->plate_id == plate_id) {
20212021
notification->set_gray(g);
20222022
}
20232023
}
@@ -2027,7 +2027,7 @@ void NotificationManager::set_all_slicing_warnings_gray(bool g, int plate_id)
20272027
{
20282028
for (std::unique_ptr<PopNotification> &notification : m_pop_notifications) {
20292029
if (notification->get_type() == NotificationType::SlicingWarning) {
2030-
if (auto obj_notif = dynamic_cast<ObjectIDNotification*>(notification.get()); obj_notif->plate_id == plate_id) {
2030+
if (auto obj_notif = dynamic_cast<ObjectIDNotification*>(notification.get()); plate_id == -1 || obj_notif->plate_id == plate_id) {
20312031
notification->set_gray(g);
20322032
}
20332033
}

src/slic3r/GUI/NotificationManager.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ class NotificationManager
225225
// Creates Slicing Warning notification with a custom text and no fade out.
226226
void push_slicing_warning_notification(const std::string &text, bool gray, ModelObject const *obj, ObjectID oid, int warning_step, int warning_msg_id, NotificationLevel level = NotificationLevel::WarningNotificationLevel);
227227
// marks slicing errors as gray for the specified plate
228-
void set_all_slicing_errors_gray(bool g, int plate_id);
228+
void set_all_slicing_errors_gray(bool g, int plate_id = -1);
229229
// marks slicing warings as gray for the specified plate
230-
void set_all_slicing_warnings_gray(bool g, int plate_id);
230+
void set_all_slicing_warnings_gray(bool g, int plate_id = -1);
231231
// void set_slicing_warning_gray(const std::string& text, bool g);
232232
// immediately stops showing slicing errors
233233
void close_slicing_errors_and_warnings();

0 commit comments

Comments
 (0)