diff --git a/src/interface/modeler/quickapp/RenderProcess.cpp b/src/interface/modeler/quickapp/RenderProcess.cpp
index 2dcc0d1..d9555f4 100644
--- a/src/interface/modeler/quickapp/RenderProcess.cpp
+++ b/src/interface/modeler/quickapp/RenderProcess.cpp
@@ -37,6 +37,17 @@ RenderProcess::RenderProcess(MainModelerWindow *window, RenderPreviewProvider *d
connect(button_quick, SIGNAL(clicked()), this, SLOT(startQuickRender()));
}
+ QObject *button_final = window->findQmlObject("tool_render_final");
+ if (button_final) {
+ connect(button_final, SIGNAL(clicked()), this, SLOT(startFinalRender()));
+ }
+
+ QObject *button_show = window->findQmlObject("tool_render_show");
+ if (button_show) {
+ button_show->setProperty("enabled", false);
+ connect(button_show, SIGNAL(clicked()), this, SLOT(showPreviousRender()));
+ }
+
startTimer(100);
}
@@ -68,6 +79,12 @@ void RenderProcess::startRender(Scenery *scenery, const RenderConfig &config)
return;
}
+ // Enable "show last render" button
+ QObject *button_show = window->findQmlObject("tool_render_show");
+ if (button_show) {
+ button_show->setProperty("enabled", true);
+ }
+
has_render = true;
rendering = true;
diff --git a/src/interface/modeler/quickapp/qml/ToolbarButton.qml b/src/interface/modeler/quickapp/qml/ToolbarButton.qml
index 5694866..9d92bb3 100644
--- a/src/interface/modeler/quickapp/qml/ToolbarButton.qml
+++ b/src/interface/modeler/quickapp/qml/ToolbarButton.qml
@@ -14,9 +14,16 @@ Item {
width: image.width + 10
height: image.height + 10
+ opacity: enabled ? 1.0 : 0.1
onSelectedChanged: changed(selected)
+ Behavior on opacity {
+ PropertyAnimation {
+ duration: 200
+ }
+ }
+
Rectangle {
id: glow
anchors.fill: parent
diff --git a/src/interface/modeler/quickapp/qml/app.qrc b/src/interface/modeler/quickapp/qml/app.qrc
index 313a7f2..24dc562 100644
--- a/src/interface/modeler/quickapp/qml/app.qrc
+++ b/src/interface/modeler/quickapp/qml/app.qrc
@@ -38,5 +38,7 @@
images/arrow_up.png
ClickableImage.qml
images/toggle_water.png
+ images/icon_render_quick.png
+ images/icon_render_show.png
diff --git a/src/interface/modeler/quickapp/qml/images/icon_render_quick.png b/src/interface/modeler/quickapp/qml/images/icon_render_quick.png
new file mode 100644
index 0000000..c97c062
Binary files /dev/null and b/src/interface/modeler/quickapp/qml/images/icon_render_quick.png differ
diff --git a/src/interface/modeler/quickapp/qml/images/icon_render_show.png b/src/interface/modeler/quickapp/qml/images/icon_render_show.png
new file mode 100644
index 0000000..e26a8e2
Binary files /dev/null and b/src/interface/modeler/quickapp/qml/images/icon_render_show.png differ
diff --git a/src/interface/modeler/quickapp/qml/main.qml b/src/interface/modeler/quickapp/qml/main.qml
index 337a7b1..7861fc9 100644
--- a/src/interface/modeler/quickapp/qml/main.qml
+++ b/src/interface/modeler/quickapp/qml/main.qml
@@ -87,9 +87,23 @@ OpenGLView {
ToolbarButton {
id: tool_render_quick
objectName: "tool_render_quick"
- picture: "images/tab_render.png"
+ picture: "images/icon_render_quick.png"
hovertext: qsTr("Start a quick render")
}
+
+ ToolbarButton {
+ id: tool_render_final
+ objectName: "tool_render_final"
+ picture: "images/tab_render.png"
+ hovertext: qsTr("Start a final render")
+ }
+
+ ToolbarButton {
+ id: tool_render_show
+ objectName: "tool_render_show"
+ picture: "images/icon_render_show.png"
+ hovertext: qsTr("Show last rendered image")
+ }
}
BaseSecondaryToolbar {