From fbab529c533b8a758fb9ce505eb8970cd037510c Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 19 Nov 2013 15:59:06 +0200 Subject: [PATCH] Make new and erase work on objects rather than just tracks --- source/designer/designer.cpp | 14 +++++++------- source/designer/designer.h | 4 ++-- source/designer/trackbar.cpp | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/designer/designer.cpp b/source/designer/designer.cpp index 6706db6..88bdf8b 100644 --- a/source/designer/designer.cpp +++ b/source/designer/designer.cpp @@ -189,21 +189,21 @@ void Designer::quit() exit(0); } -void Designer::new_track() +void Designer::new_object() { use_select_tool(); mode = CATALOGUE; - lbl_status->set_text("Select new track or press Esc to cancel"); + lbl_status->set_text("Select new object or press Esc to cancel"); } -void Designer::erase_tracks() +void Designer::erase_objects() { use_select_tool(); - set tracks = selection.get_objects(); + set objects = selection.get_objects(); selection.clear(); - for(set::iterator i=tracks.begin(); i!=tracks.end(); ++i) + for(set::iterator i=objects.begin(); i!=objects.end(); ++i) { overlay->clear(layout_3d->get_3d(**i)); delete *i; @@ -360,7 +360,7 @@ void Designer::key_press(unsigned key) if(key==Msp::Input::KEY_N && shift) use_tool_with_selected_objects(); else if(key==Msp::Input::KEY_N) - new_track(); + new_object(); else if(key==Msp::Input::KEY_G) use_tool_with_selected_objects(); else if(key==Msp::Input::KEY_R) @@ -393,7 +393,7 @@ void Designer::key_press(unsigned key) use_select_tool(); } else if(key==Msp::Input::KEY_X) - erase_tracks(); + erase_objects(); else if(key==Msp::Input::KEY_F && shift) { const set &tracks = selection.get_objects(); diff --git a/source/designer/designer.h b/source/designer/designer.h index dcaa146..2c25085 100644 --- a/source/designer/designer.h +++ b/source/designer/designer.h @@ -84,8 +84,8 @@ public: const R2C2::View3D &get_view() const { return *main_view; } const CameraController &get_camera_controller() const { return *camera_ctl; } - void new_track(); - void erase_tracks(); + void new_object(); + void erase_objects(); void track_properties(); void extend_track(); void connect_tracks(); diff --git a/source/designer/trackbar.cpp b/source/designer/trackbar.cpp index 72ac49a..4a79734 100644 --- a/source/designer/trackbar.cpp +++ b/source/designer/trackbar.cpp @@ -11,12 +11,12 @@ Trackbar::Trackbar(Designer &designer): pnl_content->add(*(btn = new GLtk::Button("New"))); btn->set_style("green"); btn->set_tooltip("Add a track piece (N)"); - btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::new_track)); + btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::new_object)); pnl_content->add(*(btn = new GLtk::Button("Del"))); btn->set_style("red"); btn->set_tooltip("Delete selected tracks (X)"); - btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::erase_tracks)); + btn->signal_clicked.connect(sigc::mem_fun(&designer, &Designer::erase_objects)); pnl_content->add(*(btn = new GLtk::Button("Prop"))); btn->set_tooltip("Change properties of selected tracks (P)"); -- 2.45.2