mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-26 15:52:02 +08:00
notification init() at first render, not notification creation. Hopefully a fix of issue #4647.
This commit is contained in:
parent
a81afce1b8
commit
3984326ee3
@ -49,13 +49,17 @@ NotificationManager::PopNotification::PopNotification(const NotificationData &n,
|
||||
, m_text2 (n.text2)
|
||||
, m_evt_handler (evt_handler)
|
||||
{
|
||||
init();
|
||||
//init();
|
||||
}
|
||||
NotificationManager::PopNotification::~PopNotification()
|
||||
{
|
||||
}
|
||||
NotificationManager::PopNotification::RenderResult NotificationManager::PopNotification::render(GLCanvas3D& canvas, const float& initial_y)
|
||||
{
|
||||
if (!m_initialized)
|
||||
{
|
||||
init();
|
||||
}
|
||||
if (m_finished)
|
||||
return RenderResult::Finished;
|
||||
if (m_close_pending) {
|
||||
@ -228,6 +232,7 @@ void NotificationManager::PopNotification::init()
|
||||
}
|
||||
m_lines_count++;
|
||||
}
|
||||
m_initialized = true;
|
||||
}
|
||||
void NotificationManager::PopNotification::set_next_window_size(ImGuiWrapper& imgui)
|
||||
{
|
||||
|
@ -121,6 +121,7 @@ public:
|
||||
const NotificationData m_data;
|
||||
|
||||
int m_id;
|
||||
bool m_initialized { false };
|
||||
// Main text
|
||||
std::string m_text1;
|
||||
// Clickable text
|
||||
|
Loading…
x
Reference in New Issue
Block a user