Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1879 for trunk/sources


Ignore:
Timestamp:
05/23/09 08:59:08 (16 years ago)
Author:
mstoeger
Message:

Layout is only updated when necessary (before painting) #498

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/3.2/LineChart.cs

    r1878 r1879  
    5656      Item = model;
    5757
     58      this.ResizeRedraw = true;
     59
    5860      UpdateLayout();
    59       canvasUI.Resize += delegate { UpdateLayout(); };
    60 
    6161      ZoomToFullView();
    6262    }
     
    7878      SetLegendPosition();
    7979
    80       canvasUI.Invalidate();
     80      this.Invalidate(true);
    8181    }
    8282
     
    246246      legendShape.CreateLegend();
    247247
    248       canvasUI.Invalidate();
     248      this.Invalidate(true);
    249249    }
    250250
     
    287287      rowEntry.LinesShape.UpdateStyle(row);
    288288
    289       UpdateLayout();
    290 
    291       canvasUI.Invalidate();
     289      this.Invalidate(true);
    292290    }
    293291
     
    324322      InitLineShapes(row);
    325323
    326       UpdateLayout();
     324      this.Invalidate(true);
    327325    }
    328326
     
    335333      rowEntries.RemoveAll(delegate(RowEntry rowEntry) { return rowEntry.DataRow == row; });
    336334
    337       UpdateLayout();
     335      this.Invalidate(true);
    338336    }
    339337
     
    351349      }
    352350
    353       canvasUI.Invalidate();
     351      this.Invalidate(true);
    354352    }
    355353
     
    486484
    487485    private void OnModelChanged() {
    488       UpdateLayout();
    489       canvasUI.Invalidate();
     486      this.Invalidate(true);
    490487    }
    491488
     
    506503
    507504      if (beginUpdateCount == 0) {
    508         canvasUI.Invalidate();
     505        this.Invalidate(true);
    509506      }
    510507    }
     
    526523      }
    527524
    528       canvasUI.Invalidate();
     525      this.Invalidate(true);
    529526    }
    530527
     
    547544
    548545      userInteractionShape.RemoveShape(rectangleShape);
    549       canvasUI.Invalidate();
     546      this.Invalidate(true);
    550547    }
    551548
    552549    private void DrawRectangle(Rectangle rectangle) {
    553550      rectangleShape.Rectangle = Transform.ToWorld(rectangle, userInteractionShape.Viewport, userInteractionShape.ClippingArea);
    554       canvasUI.Invalidate();
     551      this.Invalidate(true);
    555552    }
    556553
     
    618615        }
    619616
    620         canvasUI.Invalidate();
     617        this.Invalidate(true);
    621618      }
    622619    }
    623620
    624621    #endregion
     622
     623    protected override void OnPaint(PaintEventArgs e) {
     624      UpdateLayout();
     625      base.OnPaint(e);
     626    }
    625627
    626628    private class LinesShape : WorldShape {
Note: See TracChangeset for help on using the changeset viewer.