X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdesigner%2Fdesigner.cpp;h=cfe3938a91d3c6258d631467f14d1bd0ad7ae5ac;hb=a7bce7810670436ab667c034c80291b2f712d2a2;hp=292d5a9cb12a3e43c6b952b9306d8588644987b2;hpb=5e39ffb806f876099fcad5f2f5fe35993090de8a;p=r2c2.git diff --git a/source/designer/designer.cpp b/source/designer/designer.cpp index 292d5a9..cfe3938 100644 --- a/source/designer/designer.cpp +++ b/source/designer/designer.cpp @@ -398,14 +398,9 @@ void Designer::key_press(unsigned key) use_tool_with_selected_objects(); else if(key==Msp::Input::KEY_ESC) { - if(cur_tool) - { - delete cur_tool; - cur_tool = 0; - } - else if(mode==CATALOGUE) + if(mode==CATALOGUE) mode = SELECT; - else + else if(mode==SELECT) selection.clear(); } else if(key==Msp::Input::KEY_X) @@ -449,7 +444,7 @@ void Designer::key_press(unsigned key) template T *Designer::use_tool_with_selected_objects() { - T *tool = new T(*this, mouse, selection.get_objects()); + T *tool = new T(*this, keyboard, mouse, selection.get_objects()); use_tool(tool); return tool; } @@ -457,7 +452,7 @@ T *Designer::use_tool_with_selected_objects() template T *Designer::use_tool() { - T *tool = new T(*this, mouse); + T *tool = new T(*this, keyboard, mouse); use_tool(tool); return tool; }