几何尺寸与公差论坛

 找回密码
 注册
查看: 97|回复: 0

PR 248563 FCF profile do_math(...) called multiple times when creating or edi

[复制链接]
发表于 2009-1-20 17:22:16 | 显示全部楼层 |阅读模式
FCF profile do_math(...) called multiple times when creating or editing (F9) an FCF
<< Don Turcotte  --  06/05/07  15:27:30>>
FCF profile do_math(...) called multiple times when creating or editing (F9) an FCF.  Because the profile evaluation can be time-consuming, the extra calls to do_math(...) result in exagerated delays.
Steps to reproduce:
Load attached program in V42 debug build with breakpoint on CPCDdim_profile do_math(...).  
Also try F9 on existing FCF profile dimension and creating new FCF profile dimensions.
Results:
Multiple calls to do_math(...)
Expected Results:
Should be at most one call to do_math(...)
<<END>>

<< Changes made by Neil Kay -- 12/12/08  09:28:06>>
Action:  David Petrizze to Yanhua Huang
<<END>>
<< Don Turcotte  --  06/08/07  14:21:26>>
Must call SetActivePage(1) to setup Advanced tab.
Files inserted to server
------------------------
V42\DIMENS\FEATCTRLFRM.CPP
V43B\DIMENS\FEATCTRLFRM.CPP
<<END>>
<< Don Turcotte  --  06/08/07  11:11:05>>
Also found unnecessary calls to SetActivePage(...) which end up invoking OnKillActive(...) and therefore do_math(...).
Fixed in V42 beta and V43B.
Files inserted to server
------------------------
V42\DIMENS\FEATCTRLFRM.CPP
V42\EDITORS\EDITWIN.CPP
V42\INCLUDE\FEATCTRLFRM.H
V42\MENU\FEATCTRLFRMDLG.CPP
V43B\DIMENS\FEATCTRLFRM.CPP
V43B\EDITORS\EDITWIN.CPP
V43B\INCLUDE\FEATCTRLFRM.H
V43B\MENU\FEATCTRLFRMDLG.CPP
<<END>>
<< Changes made by Don Turcotte -- 06/08/07  11:11:24>>
Action:  Don Turcotte to David Petrizze, Status:  OPEN to REVIEW
<<END>>
<< Don Turcotte  --  06/07/07  17:30:44>>
I have identified three places where do_math(...) is called unnecessarily:
1.  When creating a new profile, if you go to Advanced tab before the FCF is created, the call to CFeatCtrlFrmDlg::OnKillActive() will call RegenerateInternalCommands().
2.  When you Create a new FCF profile, a call to CFeatCtrlFrmDlg::OnKillActive() causes a second call to do_math() (see #1).
3.  After an FCF profile has been created, if you create a new autofeature, then do_math(...) of the profile is called as a result of call fo CEditWin::OnKillFocus() which calls update_fields() which calls update_internal_commands(...) on the feature control frame unnecessarily.
I did not see extra calls on do_math(...) during execution.
<<END>>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 06:16 , Processed in 0.035014 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表