Using the new status update interface to refresh scene right after the supports are ready.

This commit is contained in:
tamasmeszaros 2018-11-21 12:10:10 +01:00
parent 87b96f4c09
commit 1a58513717
2 changed files with 18 additions and 9 deletions

View file

@ -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());
}