comparison libgui/src/m-editor/file-editor-tab.cc @ 19639:d258070914ef gui-release

open file directly without edit command when editing a function from editor * file-editor-tab.cc (handle_context_menu_edit): append .m to file name if necessary, emit new signal to editor for the file open request * file-editor-tab.h: new signal requesting to open a file * file-editor.cc (add_file_editor_tab): connect new request-open-signal to the already existing slot for opening a file
author Torsten <ttl@justmail.de>
date Thu, 22 Jan 2015 06:52:37 +0100
parents be7ac98fab43
children 4b980842edba
comparison
equal deleted inserted replaced
19633:b6bd9159c1c9 19639:d258070914ef
309 309
310 if ( filename.isEmpty ()) 310 if ( filename.isEmpty ())
311 filename = QString::fromStdString ( 311 filename = QString::fromStdString (
312 map.contents ("file").data ()[0].string_value ()); 312 map.contents ("file").data ()[0].string_value ());
313 313
314 emit execute_command_in_terminal_signal (QString("edit ") 314 if (! filename.endsWith (".m"))
315 + "\""+filename+"\""); 315 filename.append (".m");
316
317 emit request_open_file (filename);
316 } 318 }
317 319
318 void 320 void
319 file_editor_tab::set_file_name (const QString& fileName) 321 file_editor_tab::set_file_name (const QString& fileName)
320 { 322 {