mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Using the new status update interface to refresh scene right after the supports are ready.
This commit is contained in:
parent
87b96f4c09
commit
1a58513717
2 changed files with 18 additions and 9 deletions
|
@ -242,6 +242,8 @@ public:
|
|||
std::string text;
|
||||
// Bitmap of flags.
|
||||
enum FlagBits {
|
||||
DEFAULT,
|
||||
NO_RELOAD_SCENE = 0,
|
||||
RELOAD_SCENE = 1,
|
||||
};
|
||||
// Bitmap of FlagBits
|
||||
|
@ -255,7 +257,7 @@ public:
|
|||
// Register a custom status callback.
|
||||
void set_status_callback(status_callback_type cb) { m_status_callback = cb; }
|
||||
// Calls a registered callback to update the status, or print out the default message.
|
||||
void set_status(int percent, const std::string &message, unsigned int flags = 0) {
|
||||
void set_status(int percent, const std::string &message, unsigned int flags = SlicingStatus::DEFAULT) {
|
||||
if (m_status_callback) m_status_callback(SlicingStatus(percent, message, flags));
|
||||
else printf("%d => %s\n", percent, message.c_str());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue