Commit 8adb8677 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Re-activate sync button for skeletons.

parent a0d8feec
......@@ -267,3 +267,12 @@ bool EditorSession::hasNextPhrase() const
{
return nextPhrase() != nullptr;
}
void EditorSession::updateCourseFromSkeleton()
{
if (!m_course) {
qCritical() << "Not updating course from skeleton, no one set.";
return;
}
m_resourceManager->updateCourseFromSkeleton(m_course);
}
......@@ -90,6 +90,7 @@ public:
bool hasNextPhrase() const;
Q_INVOKABLE void switchToPreviousPhrase();
Q_INVOKABLE void switchToNextPhrase();
Q_INVOKABLE void updateCourseFromSkeleton();
private:
Phrase * nextPhrase() const;
......
......@@ -130,7 +130,7 @@ public:
*
* \param course the course to be update
*/
Q_INVOKABLE void updateCourseFromSkeleton(Course *course);
void updateCourseFromSkeleton(Course *course);
/**
* Add language to resource manager by parsing the given language specification file.
......
......@@ -99,6 +99,15 @@ Item
onClicked: editorSession.editSkeleton = checked
}
Item { Layout.fillWidth: true }
Button {
id: buttonSyncFromSkeleton
enabled: !buttonEditSkeleton.checked
Layout.minimumWidth: 200
text: i18n("Sync Prototype")
tooltip: i18n("Update the course with elements from prototype.")
iconName: "view-refresh"
onClicked: editorSession.updateCourseFromSkeleton()
}
CheckBox {
Layout.alignment: Qt.AlignRight
enabled: false//FIXME for now deactivating non-skeleton mode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment