Beispiel #1
0
int DeleteCurSegment()
{
	// Delete current segment.
    med_delete_segment(Cursegp);
    autosave_mine(mine_filename);
    strcpy(undo_status[Autosave_count], "Delete segment UNDONE.");
    if (Lock_view_to_cursegp)
		set_view_target_from_segment(Cursegp);
    Update_flags |= UF_WORLD_CHANGED;
    mine_changed = 1;
    diagnostic_message("Segment deleted.");
    warn_if_concave_segments();     // This could be faster -- just check if deleted segment was concave, warn accordingly

    return 1;
}
Beispiel #2
0
void delete_curve() {
	range_for (auto &i, partial_const_range(CurveSegs, CurveNumSegs))
	{
        if (i->segnum != segment_none)
			med_delete_segment(vmsegptridx(i));
    }
    Markedsegp = OriginalMarkedSeg;
    Markedside = OriginalMarkedSide;
    Cursegp = OriginalSeg;
    Curside = OriginalSide;
	med_create_new_segment_from_cursegp();
    CurveNumSegs = 0;

	//editor_status("");
	//warn_if_concave_segments();
}
Beispiel #3
0
void delete_curve() {
    int i;

	for (i=0; i<CurveNumSegs; i++) {
//        mprintf((0, "[%d] %d\n", i, CurveSegs[i]->segnum ));
        if (CurveSegs[i]->segnum != -1)
            med_delete_segment(CurveSegs[i]);
    }
    Markedsegp = OriginalMarkedSeg;
    Markedside = OriginalMarkedSide;
    Cursegp = OriginalSeg;
    Curside = OriginalSide;
	med_create_new_segment_from_cursegp();
    CurveNumSegs = 0;
//    mprintf((0, "Num_segments %d\n", Num_segments));

	//editor_status("");
	//warn_if_concave_segments();
}