mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-31 14:52:06 +00:00
Fix issue that notification shown as empty if message contains non-ascii characters
This commit is contained in:
@@ -12716,7 +12716,7 @@ void Plater::_calib_pa_pattern(const Calib_Params& params)
|
|||||||
accels.assign({accel});
|
accels.assign({accel});
|
||||||
const auto msg{_L("INFO:") + "\n" +
|
const auto msg{_L("INFO:") + "\n" +
|
||||||
_L("No accelerations provided for calibration. Use default acceleration value ") + std::to_string(long(accel)) + _L(u8"mm/s²")};
|
_L("No accelerations provided for calibration. Use default acceleration value ") + std::to_string(long(accel)) + _L(u8"mm/s²")};
|
||||||
get_notification_manager()->push_notification(msg.ToStdString());
|
get_notification_manager()->push_notification(msg.utf8_string());
|
||||||
} else {
|
} else {
|
||||||
// set max acceleration in case of batch mode to get correct test pattern size
|
// set max acceleration in case of batch mode to get correct test pattern size
|
||||||
accel = *std::max_element(accels.begin(), accels.end());
|
accel = *std::max_element(accels.begin(), accels.end());
|
||||||
@@ -12781,7 +12781,7 @@ void Plater::_calib_pa_pattern(const Calib_Params& params)
|
|||||||
speeds.assign({speed});
|
speeds.assign({speed});
|
||||||
const auto msg{_L("INFO:") + "\n" +
|
const auto msg{_L("INFO:") + "\n" +
|
||||||
_L("No speeds provided for calibration. Use default optimal speed ") + std::to_string(long(speed)) + _L("mm/s")};
|
_L("No speeds provided for calibration. Use default optimal speed ") + std::to_string(long(speed)) + _L("mm/s")};
|
||||||
get_notification_manager()->push_notification(msg.ToStdString());
|
get_notification_manager()->push_notification(msg.utf8_string());
|
||||||
} else if (speeds.size() == 1) {
|
} else if (speeds.size() == 1) {
|
||||||
// If we have single value provided, set speed using global configuration.
|
// If we have single value provided, set speed using global configuration.
|
||||||
// per-object config is not set in this case
|
// per-object config is not set in this case
|
||||||
|
|||||||
Reference in New Issue
Block a user