src/gui_actions.cpp

changeset 460
b230ae09c8e5
parent 455
c5d14d112034
child 461
fbcc91ae1dd2
--- a/src/gui_actions.cpp	Sun Aug 18 17:38:33 2013 +0300
+++ b/src/gui_actions.cpp	Sun Aug 18 17:53:23 2013 +0300
@@ -52,26 +52,26 @@
 	
 	newFile();
 	
-	const LDBFCObject::Type BFCType =
-		ui.rb_bfc_ccw->isChecked() ? LDBFCObject::CertifyCCW :
-		ui.rb_bfc_cw->isChecked()  ? LDBFCObject::CertifyCW : LDBFCObject::NoCertify;
+	const LDBFC::Type BFCType =
+		ui.rb_bfc_ccw->isChecked() ? LDBFC::CertifyCCW :
+		ui.rb_bfc_cw->isChecked()  ? LDBFC::CertifyCW : LDBFC::NoCertify;
 	
 	const str license =
 		ui.rb_license_ca->isChecked()    ? CALicense :
 		ui.rb_license_nonca->isChecked() ? NonCALicense : "";
 	
 	LDFile* f = LDFile::current();
-	*f << new LDCommentObject (ui.le_title->text());
-	*f << new LDCommentObject ("Name: <untitled>.dat" );
-	*f << new LDCommentObject (fmt ("Author: %1", ui.le_author->text()));
-	*f << new LDCommentObject (fmt ("!LDRAW_ORG Unofficial_Part"));
+	*f << new LDComment (ui.le_title->text());
+	*f << new LDComment ("Name: <untitled>.dat" );
+	*f << new LDComment (fmt ("Author: %1", ui.le_author->text()));
+	*f << new LDComment (fmt ("!LDRAW_ORG Unofficial_Part"));
 	
 	if (license != "")
-		*f << new LDCommentObject (license);
+		*f << new LDComment (license);
 	
-	*f << new LDEmptyObject;
-	*f << new LDBFCObject (BFCType);
-	*f << new LDEmptyObject;
+	*f << new LDEmpty;
+	*f << new LDBFC (BFCType);
+	*f << new LDEmpty;
 	
 	g_win->fullRefresh();
 }
@@ -180,7 +180,7 @@
 // =============================================================================
 // -----------------------------------------------------------------------------
 DEFINE_ACTION (NewCLine, 0) {
-	AddObjectDialog::staticDialog (LDObject::CondLine, null);
+	AddObjectDialog::staticDialog (LDObject::CndLine, null);
 }
 
 // =============================================================================
@@ -278,10 +278,10 @@
 	str refName;
 	
 	if (type == LDObject::Subfile) {
-		refName = static_cast<LDSubfileObject*> (g_win->sel()[0])->fileInfo()->name();
+		refName = static_cast<LDSubfile*> (g_win->sel()[0])->fileInfo()->name();
 		
 		for (LDObject* obj : g_win->sel())
-			if (static_cast<LDSubfileObject*> (obj)->fileInfo()->name() != refName)
+			if (static_cast<LDSubfile*> (obj)->fileInfo()->name() != refName)
 				return;
 	}
 	
@@ -290,7 +290,7 @@
 		if (obj->getType() != type)
 			continue;
 		
-		if (type == LDObject::Subfile && static_cast<LDSubfileObject*> (obj)->fileInfo()->name() != refName)
+		if (type == LDObject::Subfile && static_cast<LDSubfile*> (obj)->fileInfo()->name() != refName)
 			continue;
 		
 		g_win->sel() << obj;

mercurial