X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fstate_text.cpp;h=8f7d0c9a00a0fb0376e9783a1b90687dbdeda750;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=dd2bba5a862dacc851c8797393f0d00eb18dffbf;hpb=7d32bfd071e0604f70618da4e39d27172a4809a8;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/state_text.cpp b/synfig-studio/trunk/src/gtkmm/state_text.cpp index dd2bba5..8f7d0c9 100644 --- a/synfig-studio/trunk/src/gtkmm/state_text.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_text.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -280,6 +281,7 @@ StateText_Context::StateText_Context(CanvasView *canvas_view): widget_orientation.set_digits(2); + options_table.attach(*manage(new Gtk::Label(_("Text Tool"))), 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); options_table.attach(entry_id, 0, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); options_table.attach(checkbutton_paragraph, 0, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); options_table.attach(*manage(new Gtk::Label(_("Size:"))), 0, 1, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); @@ -347,6 +349,8 @@ StateText_Context::~StateText_Context() get_work_area()->queue_draw(); + get_canvas_view()->queue_rebuild_ducks(); + App::toolbox->refresh(); } @@ -383,6 +387,8 @@ StateText_Context::make_text(const Point& _point) } synfigapp::SelectionManager::LayerList layer_selection; + if (!getenv("SYNFIG_TOOLS_CLEAR_SELECTION")) + layer_selection = get_canvas_view()->get_selection_manager()->get_selected_layers(); const synfig::TransformStack& transform(get_canvas_view()->get_curr_transform_stack()); const Point point(transform.unperform(_point)); @@ -394,10 +400,16 @@ StateText_Context::make_text(const Point& _point) App::dialog_entry(_("Text Entry"), _("Enter text here:"), text); layer=get_canvas_interface()->add_layer_to("text",canvas,depth); + if (!layer) + { + get_canvas_view()->get_ui_interface()->error(_("Unable to create layer")); + group.cancel(); + return; + } layer_selection.push_back(layer); - layer->set_param("pos",point); - get_canvas_interface()->signal_layer_param_changed()(layer,"pos"); + layer->set_param("origin",point); + get_canvas_interface()->signal_layer_param_changed()(layer,"origin"); layer->set_param("text",text); get_canvas_interface()->signal_layer_param_changed()(layer,"text");