cart: empty [ Login ]

EntitySelector.GetEntitiesInRectangle strange behaviour

1 
sten
3/11/2014 3:32 PM
Hi again! I've a strange problem with GetEntitiesInRectangle. After a call to this method the MouseWheel event is not generated anymore. A similar code which uses GetClosestEntities doesn't cause any problem.
C# Code:
private void button1_Click(object sender, EventArgs e) { foreach (DxfEntity entity in dxfControl1.Select1()) { DxfLine line = entity as DxfLine; if (line != null) { line.LineType = dottedLineType; line.LineTypeScale = LINE_TYPE_SCALE; } } dxfControl1.UpdateDrawables(); } public IEnumerable<DxfEntity> Select1() { IList<RenderedEntityInfo> enclosedEntities = EntitySelector.GetEntitiesInRectangle( model, GraphicsConfig.BlackBackgroundCorrectForBackColor, gdiGraphics3D.To2DTransform, new Rectangle2D(275, 140, 325, 165) //new Rectangle2D(ClientRectangle.Left, ClientRectangle.Top, ClientRectangle.Right, ClientRectangle.Bottom) ); if (enclosedEntities.Count == 0) return new DxfEntity[0]; else return enclosedEntities.Select(rei => rei.Entity); } }
Is it a bug? Thanks, Stenio
Wout
3/11/2014 8:03 PM
No idea. If you can incorporate this in one of the example viewers and post your code here I will have a look at it. - Wout
1