zz_setContentsDialog.cpp

changeset 25
c74bb88f537d
parent 22
335e430a6b4f
child 26
83184d9407c7
equal deleted inserted replaced
24:d2d4d0154338 25:c74bb88f537d
53 // 53 //
54 // Performs the Set Contents dialog on the given LDObject. Object's contents 54 // Performs the Set Contents dialog on the given LDObject. Object's contents
55 // are exposed to the user and is reinterpreted if the user accepts the new 55 // are exposed to the user and is reinterpreted if the user accepts the new
56 // contents. 56 // contents.
57 // ============================================================================= 57 // =============================================================================
58 void Dialog_SetContents::staticDialog (LDObject* obj, LDForgeWindow* parent) { 58 void Dialog_SetContents::staticDialog (LDObject* obj, ForgeWindow* parent) {
59 if (!obj) 59 if (!obj)
60 return; 60 return;
61 61
62 Dialog_SetContents dlg (obj, parent); 62 Dialog_SetContents dlg (obj, parent);
63 if (dlg.exec ()) { 63 if (dlg.exec ()) {
64 LDObject* oldobj = obj; 64 LDObject* oldobj = obj;
65 65
66 // Reinterpret it from the text of the input field 66 // Reinterpret it from the text of the input field
67 obj = ParseLine (dlg.qContents->text ().toStdString ().c_str ()); 67 obj = parseLine (dlg.qContents->text ().toStdString ().c_str ());
68 68
69 // Remove the old object 69 // Remove the old object
70 delete oldobj; 70 delete oldobj;
71 71
72 // Replace all instances of the old object with the new object 72 // Replace all instances of the old object with the new object

mercurial