113 slot_dimensionsChanged (); |
113 slot_dimensionsChanged (); |
114 fillDefaults (cam); |
114 fillDefaults (cam); |
115 } |
115 } |
116 |
116 |
117 void OverlayDialog::fillDefaults (int newcam) { |
117 void OverlayDialog::fillDefaults (int newcam) { |
118 overlayMeta& info = g_overlays[newcam]; |
118 overlayMeta& info = g_win->R ()->getOverlay (newcam); |
119 |
119 |
120 if (info.img != null) { |
120 if (info.img != null) { |
121 le_fpath->setText (info.fname); |
121 le_fpath->setText (info.fname); |
122 sb_ofsx->setValue (info.ox); |
122 sb_ofsx->setValue (info.ox); |
123 sb_ofsy->setValue (info.oy); |
123 sb_ofsy->setValue (info.oy); |
407 const char* license = |
407 const char* license = |
408 (idx == CCAL) ? "Redistributable under CCAL version 2.0 : see CAreadme.txt" : |
408 (idx == CCAL) ? "Redistributable under CCAL version 2.0 : see CAreadme.txt" : |
409 (idx == NonCA) ? "Not redistributable : see NonCAreadme.txt" : |
409 (idx == NonCA) ? "Not redistributable : see NonCAreadme.txt" : |
410 null; |
410 null; |
411 |
411 |
412 objs.push_back (new LDComment (dlg.le_name->text ())); |
412 objs << new LDComment (dlg.le_name->text ()); |
413 objs.push_back (new LDComment ("Name: <untitled>.dat")); |
413 objs << new LDComment ("Name: <untitled>.dat"); |
414 objs.push_back (new LDComment (fmt ("Author: %s", author.chars()))); |
414 objs << new LDComment (fmt ("Author: %s", author.chars())); |
415 objs.push_back (new LDComment (fmt ("!LDRAW_ORG Unofficial_Part"))); |
415 objs << new LDComment (fmt ("!LDRAW_ORG Unofficial_Part")); |
416 |
416 |
417 if (license != null) |
417 if (license != null) |
418 objs.push_back (new LDComment (fmt ("!LICENSE %s", license))); |
418 objs << new LDComment (fmt ("!LICENSE %s", license)); |
419 |
419 |
420 objs.push_back (new LDEmpty); |
420 objs << new LDEmpty; |
421 objs.push_back (new LDBFC (BFCType)); |
421 objs << new LDBFC (BFCType); |
422 objs.push_back (new LDEmpty); |
422 objs << new LDEmpty; |
423 |
423 |
424 g_win->fullRefresh (); |
424 g_win->fullRefresh (); |
425 } |
425 } |
426 |
426 |
427 // ============================================================================= |
427 // ============================================================================= |