Fix update order

This commit is contained in:
Filip Sykala 2021-12-16 12:33:26 +01:00
parent d08e6d8c1b
commit 9a9c8213cb
2 changed files with 4 additions and 1 deletions

View File

@ -37,6 +37,9 @@ public:
/// <returns>Return True when use the information otherwise False.</returns> /// <returns>Return True when use the information otherwise False.</returns>
bool on_mouse(const wxMouseEvent &mouse_event) override; bool on_mouse(const wxMouseEvent &mouse_event) override;
/// <summary>
/// Detect reduction of move for wipetover on selection change
/// </summary>
void data_changed() override; void data_changed() override;
protected: protected:
bool on_init() override; bool on_init() override;

View File

@ -217,11 +217,11 @@ void GLGizmosManager::set_hover_id(int id)
void GLGizmosManager::update_data() void GLGizmosManager::update_data()
{ {
if (!m_enabled) return; if (!m_enabled) return;
if (m_current != Undefined) m_gizmos[m_current]->data_changed();
if (m_common_gizmos_data) if (m_common_gizmos_data)
m_common_gizmos_data->update(get_current() m_common_gizmos_data->update(get_current()
? get_current()->get_requirements() ? get_current()->get_requirements()
: CommonGizmosDataID(0)); : CommonGizmosDataID(0));
if (m_current != Undefined) m_gizmos[m_current]->data_changed();
} }
bool GLGizmosManager::is_running() const bool GLGizmosManager::is_running() const