Advertisement
Guest User

MQUndoCrasher.cpp

a guest
May 18th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. BOOL MyCommandPlugin::OnLeftButtonDown(MQDocument doc, MQScene scene, MOUSE_BUTTON_STATE& state)
  2. {
  3. int idx[3];
  4. MQObject o = doc->GetObject(0);
  5. if(o==NULL)return FALSE;
  6. idx[0] = 0;
  7. idx[1] = 1;
  8. idx[2] = o->AddVertex(MQPoint(0, 0, 0));
  9. o->AddFace(3, idx);
  10.  
  11. UpdateUndo(); // MQ_RefreshView -> UpdateUndo の順番だとOK。UpdateUndo -> MQ_RefreshView の順番だとNG
  12. MQ_RefreshView(NULL);
  13. OutputDebugStringA("UndoE\n");
  14.  
  15. return TRUE;
  16. }
  17.  
  18. // 以後、標準ツール(選択など)を操作するたびに
  19. // MDocument::updateCurrentUndoSelectionObject() : Different number of vertices.
  20. // MDocument::updateCurrentUndoSelectionObject() : Different number of faces.
  21. // がOutputDebugStringで表示される
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement