diff --git a/examplescript.js b/examplescript.vys similarity index 100% rename from examplescript.js rename to examplescript.vys diff --git a/macros/slideeditor-snapshot.vys b/macros/slideeditor-snapshot.vys index 0aec4c3f..80ba1027 100644 --- a/macros/slideeditor-snapshot.vys +++ b/macros/slideeditor-snapshot.vys @@ -1,5 +1,6 @@ -# Template for taking snapshots in slideeditor +// Template for taking snapshots in slideeditor -setMapZoom(CURRENT_ZOOM); -setMapRotation(CURRENT_ANGLE); -centerOnID(CURRENT_ID); +map = vym.currentMap(); +map.setMapZoom(CURRENT_ZOOM); +map.setMapRotation(CURRENT_ANGLE); +map.centerOnID(CURRENT_ID); diff --git a/scripteditor.cpp b/scripteditor.cpp index a542b44c..9e6badf4 100644 --- a/scripteditor.cpp +++ b/scripteditor.cpp @@ -127,12 +127,12 @@ void ScriptEditor::setSlideScript(uint model_id, uint slide_id,const QString &s) void ScriptEditor::runMacro() { - emit runLegacyScript (ui.macroEditor->toPlainText() ); + emit runScript (ui.macroEditor->toPlainText() ); } void ScriptEditor::runSlide() { - emit runLegacyScript (ui.slideEditor->toPlainText() ); + emit runScript (ui.slideEditor->toPlainText() ); } void ScriptEditor::runFile() @@ -152,7 +152,7 @@ void ScriptEditor::saveMacro() } void ScriptEditor::loadFile() { - QString filter("VYM scripts (*.vys *.js);;All (*)"); + QString filter("VYM scripts (*.vys);;All (*)"); QString fn = QFileDialog::getOpenFileName( this, vymName + " - " + tr("Load script"), diff --git a/scripteditor.h b/scripteditor.h index 0db88358..375bc5db 100644 --- a/scripteditor.h +++ b/scripteditor.h @@ -35,7 +35,6 @@ public slots: void saveFileAs(); signals: - void runLegacyScript (QString); void runScript (QString); private: