OSC / VFTsolid

Windows desktop GUI for visualizing 3D wireframe meshes and setting-up weld passes for later simulation
0 stars 0 forks source link

Deleting weld passes needs cancel feature #4

Closed bbrust closed 9 years ago

bbrust commented 9 years ago

image

When deleting weld passes there is no 'cancel' feature. You must delete a pass whether you change mind or not.

nickjer commented 9 years ago

Ed,

If you want I can take a look at this.

epunch14 commented 9 years ago

Dear Jeremy, Please go ahead. Did you just want to add an "Are you sure you want to delete" messagebox, or make the delete "Undo-able" (which would require a memory rewrite)?

I took a quick look at how to approach it. (I) Launch XE7........... src........etc (ii) Design tab -> Click on MainMenu1 Click on menu item Weld/Delete weld pass... (iii) In View/object inspector, see Action= DeleteWeldPass This is actually the routine void __fastcall TForm1::DeleteWeldPassExecute(...) (iv) Search Unit1.cpp for this -> line 15079 It creates TForm26 with option#1 (v) Open Unit26 in IDE It calls Form1->VFTlistbox_public() (vi) Search Unit1 for this -> line 13207 void TForm1::VFTlistbox_public() if(VFTsel==1)DelWeldPass(.....) (vii) Find it in Unit1 -> line 13224 DelWeldPass(....) This routine deletes weld pass #VFTitemindex data and compacts the remaining WPs. Finally it redraws the screen by Invalidate(), which forces Form1Paint().

Did you want to use Tee2.msh as a test? Hit me with any questions. (polite questions....) Good luck, EdP

nickjer commented 9 years ago

I was just going to add an OK and Cancel button. Although I believe as soon as they click a weldpass it automatically deletes it. I will just remove that feature and force them to click OK to remove it.

Thanks for the very useful outline. I'll be sure to keep all my questions polite, hah.

epunch14 commented 9 years ago

The only "deep" routine in this code is FormMouseDown (line 11140), which handles mouse (down) clicks. else if(FD_LButtonstatus==17) This responds to mouse clicks creating WPs/normals/etc. Not fun. If you ever need to get into it, I can document it better. EdP

nickjer commented 9 years ago

Added fix with commit: 16429c36feb60b1650e6282acb65a5adb9ca9978

image