Changeset 8575:c6c64d6d9f0b in orange


Ignore:
Timestamp:
08/02/11 15:46:18 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
fd7813b5ab5a4d3bbc1fe80aa14d285f9ba95cb9
Message:

Unregister points before they are deleted or the curve is removed.

Location:
source/orangeplot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/orangeplot/curve.cpp

    r8570 r8575  
    3131{ 
    3232    cancelAllUpdates(); 
     33    if (plot()) 
     34    { 
     35        plot()->remove_all_points(this); 
     36    } 
    3337} 
    3438 
  • source/orangeplot/networkcurve.cpp

    r8569 r8575  
    537537{ 
    538538    NodeItem* node = m_nodes.take(index); 
     539    Plot* p = plot(); 
     540    if (p) 
     541    { 
     542        DataPoint d; 
     543        d.x = node->x(); 
     544        d.y = node->y(); 
     545        p->remove_point(d, this); 
     546    } 
    539547    foreach (EdgeItem* edge, node->connected_edges()) 
    540548    { 
Note: See TracChangeset for help on using the changeset viewer.