Commit a0f3e47a authored by Thibault Soucarre's avatar Thibault Soucarre

correct links drawing when using node selection

parent dcf9a4b1
......@@ -6,13 +6,13 @@
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
......@@ -23,7 +23,7 @@
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
......@@ -37,7 +37,7 @@
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
** - VUCHENER Clément
**
*/
/*!
......@@ -80,9 +80,9 @@ class QDomDocument;
*/
class Node_select : public QWidget, protected Ui::node_selector {
Q_OBJECT
private:
std::vector<Container *> _initial_containers;
......@@ -91,9 +91,9 @@ class Node_select : public QWidget, protected Ui::node_selector {
int _screen_width, _screen_height;
std::string _file_viewed;
Trace* _trace;
Interface_graphic *_console;
bool _sort_order;
Interface_graphic *_console;
bool _sort_order;
public:
/*!
* Default constructor
......@@ -102,16 +102,16 @@ public:
Node_select( Interface_graphic *console, QWidget *parent = 0);
~Node_select();
/*!
* \fn set_initial_container_names()
* \brief Set the names of the containers in the original containers trees, from the trace _root_containers
*/
void set_initial_container_names();
/*!
* \fn set_initial_container_names()
* \brief Set the names of the containers in the displayed containers tree, from the trace _view_root_containers or if empty from _root_containers
* \brief Set the names of the containers in the displayed containers tree, from the trace _view_root_containers or if empty from _root_containers
*/
void set_displayed_container_names();
......@@ -127,14 +127,14 @@ public:
* \brief returns the trace
*/
Trace * get_trace();
/*!
* \fn set_filename(std::string filename)
* \brief Set the name of the file trace.
* \param filename The file name.
*/
void set_filename(std::string filename);
/*!
* \fn init_window()
......@@ -149,7 +149,7 @@ public:
*/
void close_window();
private:
......@@ -158,8 +158,8 @@ private:
* \brief build a displayable array of Node from the tree viewed
* \param displayed_containers an empty list of containers to fill
*/
void build_displayed_nodes( std::list<Container *>& displayed_containers);
void build_displayed_nodes( std::list<Container *>& displayed_containers);
/*!
* \fn set_container_names_rec()
* \brief recursive method used to build tree views from the trace
......@@ -171,7 +171,7 @@ private:
* \brief recursive method used to build trace view from tree views
*/
void reassign_children_rec(QTreeWidgetItem* item, QFlags<Qt::CheckState> flg);
/*!
* \fn export_children_rec()
* \brief recursive method used to build xml file from tree views
......@@ -182,14 +182,14 @@ private:
* \param event The event triggered by the keyboard event.
*/
void keyPressEvent(QKeyEvent *event);
private slots:
void on_reset_button_clicked();
void on_export_button_clicked();
void on_load_button_clicked();
void on_display_button_clicked();
void on_sort_button_clicked();
......
......@@ -106,6 +106,7 @@ Render_alternate::Render_alternate(Core* core, QWidget *parent, const QGLFormat&
//_arrows(GL_LINE),
//_arrows2(GL_TRIANGLES),
_counters(NULL),
_arrows3(NULL),
_ruler(NULL),
_wait(NULL),
_modelview(glm::mat4(1.0)), _projection(glm::mat4(1.0)),
......@@ -588,6 +589,10 @@ bool Render_alternate::unbuild(){
_text_pos.clear();
_text_value.clear();
clear_text();
_links.clear();
_states.clear();
_arrows.clear();
_events.clear();
//_arrows.clear();
//_circles.clear();
......@@ -789,6 +794,7 @@ void Render_alternate::start_draw_containers(){
Shader *s = new Shader(_glsl);
s->charger();
_containers.set_shader(s);
_containers.setNbVertex(0);
}
void Render_alternate::draw_container(const Element_pos , const Element_pos , const Element_pos , const Element_pos ){
......@@ -886,6 +892,7 @@ void Render_alternate::end_draw_arrows(){
_arrows3.add(0,0,1,1,1);
_arrows3.add(-1.2, -0.4, 1, 1, 1);
_arrows3.add(-1.2, 0.4, 1, 1, 1);
_arrows3.setNbVertex(3);
//send datas to vbo
std::map<EntityValue*, std::pair<Vbo*, Vbo*> >::iterator it = _arrows.begin();
while(it != _arrows.end()){
......
......@@ -464,7 +464,8 @@ public:
link = *it;
EntityValue *value = link->get_value();
const Color *color = value->get_used_color();
draw_link(draw_object, link, color, value);
if(link_is_in_set(link,set_container,interval))
draw_link(draw_object, link, color, value);
/*bool display=false;
color=NULL;
if(!Session::get_use_palette("link_types")) display = true;
......
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