几何尺寸与公差论坛

 找回密码
 注册
查看: 106|回复: 2

PR 241117 Grouping doesn? refresh the edit window correctly

[复制链接]
发表于 2009-5-6 14:25:12 | 显示全部楼层 |阅读模式
Grouping doesn? refresh the edit window correctly
<< Werner Habermann  --  06/07/06  13:38:44>>
We noticed this during the meeting at Audi today.
<<END>>

<< Jerry Naylor  --  08/21/06  10:23:48>>
wasaddedtoreadme41B&41R
<<END>>
<< Changes made by Werner Habermann -- 08/18/06  08:46:46>>
Status:  RESOLVED to CLOSED
<<END>>
<< Changes made by Bret Naylor -- 08/17/06  09:20:22>>
Action:  Bret Naylor to Werner Habermann, Status:  REVIEW to RESOLVED
<<END>>
<< Rex Heagy  --  06/23/06  08:57:57>>
Reviewed.
<<END>>
<< Changes made by Rex Heagy -- 06/23/06  08:58:01>>
Action:  Rex Heagy to Bret Naylor
<<END>>
<< David Petrizze  --  06/23/06  05:44:00>>
Fixed:
******************************
Fri Jun 23 05:43:26 2006
******************************
Files inserted to server
------------------------
V41B\EDITORS\EDITWIN.CPP
V41B\INCLUDE\EDITWIN.H
V41B\SOURCE\GLOBALS.CPP
V41R\EDITORS\EDITWIN.CPP
V41R\INCLUDE\EDITWIN.H
V41R\SOURCE\GLOBALS.CPP
V42\EDITORS\EDITWIN.CPP
V42\INCLUDE\EDITWIN.H
V42\SOURCE\GLOBALS.CPP
<<END>>
<< Changes made by David Petrizze -- 06/23/06  05:44:10>>
Action:  David Petrizze to Rex Heagy, Status:  OPEN to REVIEW
<<END>>
<< David Petrizze  --  06/22/06  19:38:31>>
I think I've figured it out but am having some problems with the edit window selection.  I'll come back to this later tonight.
<<END>>
<< Bill Wilcox  --  06/21/06  23:04:37>>
Hi David, Possibly there is someone else that should take this but I am having a problem with the groups getting created in summary mode after I have inserted a bunch of them. This is stop release because I need this enhancment for VW and Audi. What I have been doing to test this is to call the function AutoCreateGroupsForAudiMess from the insert sync move in pcdlrn.cpp. Normally this function will be called from Automation but for testing I have been disabling the insert move sync command and calling this new function instead. It inserts correctly in an audimess part program the groups and then it refreshes the edit window. The regular edit window looks fine and all is OK. The Summary mode does not generate the groups correctly. It is messed up. If I save the part program and re-load it then summary mode correctly loads in the groups and all is well.
<<END>>
<< Changes made by Bill Wilcox -- 06/21/06  23:04:39>>
Action:  Bill Wilcox to David Petrizze, Assigned:  Bill Wilcox to David Petrizze, Priority:  High to Stop Rel.
<<END>>
<< Bill Wilcox  --  06/15/06  12:54:56>>
I have partially fixed this. It now opens and closes the groups correctly in the text mode edit window (this always worked correctly in the summary view). It still does not create the summary view correctly from the beginning when it re-freshes.
<<END>>
<< Changes made by Bill Wilcox -- 06/08/06  14:07:37>>
Action:  David Petrizze to Bill Wilcox, Assigned:  David Petrizze to Bill Wilcox
<<END>>
<< Changes made by Tim Wernicke -- 06/07/06  08:54:36>>
Action:  Bill Wilcox to David Petrizze, Assigned:  Bill Wilcox to David Petrizze, Priority:  to High
<<END>>
 楼主| 发表于 2009-5-6 14:28:21 | 显示全部楼层

回复: PR 241117 Grouping doesn? refresh the edit window correctly

// I've added this method for internal use of inserting groups into the edit window
// ref 241117 - Stop Release
void CEditWin::InsertGroup(CPCDcommand *pFromCmd, CPCDcommand *pToCmd, const CString &strGroupName)
{
  long from_row, to_row;

  from_row = start_line_of_obj(pFromCmd);
  to_row = end_line_of_obj(start_line_of_obj(pToCmd));

  CPCDgroup_start *pGroupStart = new CPCDgroup_start(m_pPartProgram, NONE, strGroupName, 0);
  CPCDgroup_end   *pGroupEnd   = new CPCDgroup_end(m_pPartProgram);
  if(from_row > 0 && to_row > 0 && pGroupStart && pGroupEnd && pFromCmd && pToCmd)
  {
    pGroupStart->InsertBefore(pFromCmd);
    pGroupEnd->InsertAfter(pToCmd);

    set_insertion_pt_after(pGroupStart->prev, TRUE);

    remove_obj_from_win(from_row, to_row);

    pFromCmd = pGroupStart;
    while(pFromCmd)
    {
      m_pPartProgram->m_pTreeView->RemoveCommand(pFromCmd);
      pFromCmd->CallCreateText(EW_LANGUAGE);
      if(pFromCmd == pGroupEnd) break;
      pFromCmd = pFromCmd->next;
    }
  }
}
 楼主| 发表于 2009-5-6 14:30:43 | 显示全部楼层

回复: PR 241117 Grouping doesn? refresh the edit window correctly

editor->InsertGroup(FirstCommandInGroup, LastDimension, GroupName);
  /*
  CPCDcommand *group = new CPCDgroup_start(m_pPartProgram, NONE, GroupName, 0);
  CPCDcommand *end_group = new CPCDgroup_end(m_pPartProgram);
  group->InsertAfter(ptr2);
  end_group->InsertAfter(LastDimension);
  */
  FirstCommandInGroup->MatchExecutionArmsToMine(FirstCommandInGroup->prev);
  FirstCommandInGroup->MatchExecutionArmsToMine(LastDimension->next);
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-1-3 09:52 , Processed in 0.039286 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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