Don't show selection handles in the MiniEditor

This commit is contained in:
David Capello 2014-08-09 12:24:04 -03:00
parent 3bbdb80461
commit 7632e83046
2 changed files with 5 additions and 2 deletions

View File

@ -101,6 +101,8 @@ namespace app {
EditorDecorator* decorator() { return m_decorator; }
void setDecorator(EditorDecorator* decorator) { m_decorator = decorator; }
EditorFlags editorFlags() const { return m_flags; }
Document* document() { return m_document; }
Sprite* sprite() { return m_sprite; }
Layer* layer() { return m_layer; }

View File

@ -660,14 +660,15 @@ void StandbyState::Decorator::postRenderDecorator(EditorPostRender* render)
Editor* editor = render->getEditor();
// Draw transformation handles (if the mask is visible and isn't frozen).
if (editor->document()->isMaskVisible() &&
if (editor->editorFlags() & Editor::kShowMaskFlag &&
editor->document()->isMaskVisible() &&
!editor->document()->mask()->isFrozen()) {
// And draw only when the user has a selection tool as active tool.
tools::Tool* currentTool = editor->getCurrentEditorTool();
if (currentTool->getInk(0)->isSelection())
getTransformHandles(editor)->drawHandles(editor,
m_standbyState->getTransformation(editor));
m_standbyState->getTransformation(editor));
}
}