Commit 5ac10cdd authored by Olivier Lagrasse's avatar Olivier Lagrasse

- Fix bug when user zoom - close - load a trace. (position of container texts)

parent cf0afca0
......@@ -74,3 +74,20 @@ Element_pos Info::Render::_info_accurate = 0.0;
bool Info::Render::_no_arrows = false;
bool Info::Render::_no_events = false;
void Info::release_all(){
Info::Container::x_min = 0;
Info::Container::x_max = 0;
Info::Container::y_min = 0;
Info::Container::y_max = 0;
Info::Entity::x_min = 0;
Info::Entity::x_max = 0;
Info::Entity::y_min = 0;
Info::Entity::y_max = 0;
Info::Render::_x_min_visible = 0.0;
Info::Render::_x_max_visible = 0.0;
}
......@@ -72,7 +72,11 @@ public:
*/
virtual ~Info();
/*!
* \brief Release all Info class attributes.
*/
static void release_all();
/*!
* \brief Sub structure to store screen information.
*/
......
......@@ -749,6 +749,10 @@ void Core::launch_action(int state, void* arg) {
_render_opengl->updateGL();
/* Release all data */
Info::release_all();
break;
......
......@@ -454,18 +454,26 @@ bool Render_opengl::unbuild(){
_wait_angle=0.0f;/* begin with 0 rad angle */
/* init measurement attributes */
Info::Container::x_max = 0;
/* Info::Container::x_max = 0;
Info::Container::y_max = 0;
Info::Container::x_min = 0;
Info::Container::y_min = 0;
Info::Entity::x_max = 0;
Info::Entity::x_min = 0;
Info::Entity::x_min = 0;*/
// _state_x_max = 0;
_state_y_max = 0;
// _state_x_min = 0;
_state_y_min = 0;
/* TODO: call method which release Geometry attribute values */
_x_state_scale = 1;/* for states scaling */
_x_state_translate = 0;/* for states translation */
_y_state_scale = 1;/* for states scaling */
_y_state_translate = 0;/* for states translation */
_x_scroll_pos = 0;/* horizontal bar placed on 0 */
_y_scroll_pos = 0;
/* clear lists to store container texts */
_text_pos.clear();
_text_value.clear();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment