mirror of https://github.com/CGAL/cgal
fix the busy waiting of the implicit functions
This commit is contained in:
parent
227b8f58dc
commit
4285d49d2d
|
|
@ -1324,7 +1324,5 @@ Scene_c3t3_item::setColor(QColor c)
|
|||
color_ = c;
|
||||
compute_color_map(c);
|
||||
invalidateOpenGLBuffers();
|
||||
// changed() doesn't work because the timerEvent delays it out of the draw
|
||||
// function and the intersection is not drawn before the next draw call
|
||||
are_intersection_buffers_filled = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -353,7 +353,6 @@ Scene_implicit_function_item(Implicit_function_interface* f)
|
|||
texture = new Texture(grid_size_-1,grid_size_-1);
|
||||
blue_color_ramp_.build_blue();
|
||||
red_color_ramp_.build_red();
|
||||
startTimer(0);
|
||||
//Generates an integer which will be used as ID for each buffer
|
||||
compute_min_max();
|
||||
compute_function_grid();
|
||||
|
|
@ -583,7 +582,7 @@ Scene_implicit_function_item::invalidateOpenGLBuffers()
|
|||
}
|
||||
|
||||
|
||||
void Scene_implicit_function_item::timerEvent(QTimerEvent* /*event*/)
|
||||
void Scene_implicit_function_item::updateCutPlane()
|
||||
{ // just handle deformation - paint like selection is handled in eventFilter()
|
||||
if(need_update_) {
|
||||
compute_function_grid();
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@ public:
|
|||
virtual QString toolTip() const;
|
||||
virtual void invalidateOpenGLBuffers();
|
||||
public Q_SLOTS:
|
||||
void plane_was_moved() { need_update_ = true; }
|
||||
void plane_was_moved() { need_update_ = true; QTimer::singleShot(0, this, SLOT(updateCutPlane())); }
|
||||
void compute_function_grid() const;
|
||||
void timerEvent(QTimerEvent*);
|
||||
void updateCutPlane();
|
||||
|
||||
private:
|
||||
typedef qglviewer::Vec Point;
|
||||
|
|
|
|||
Loading…
Reference in New Issue