mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-23 22:43:32 +00:00
Move editor_type() -> Editor::Type()
This commit is contained in:
parent
636531c6da
commit
8d5133fe09
@ -185,7 +185,7 @@ void EyedropperCommand::onExecute(Context* context)
|
||||
{
|
||||
gfx::Point mousePos = ui::get_mouse_position();
|
||||
Widget* widget = ui::Manager::getDefault()->pick(mousePos);
|
||||
if (!widget || widget->type() != editor_type())
|
||||
if (!widget || widget->type() != Editor::Type())
|
||||
return;
|
||||
|
||||
Editor* editor = static_cast<Editor*>(widget);
|
||||
|
@ -84,7 +84,7 @@ void ZoomCommand::onExecute(Context* context)
|
||||
|
||||
// Try to use the editor above the mouse.
|
||||
ui::Widget* pick = ui::Manager::getDefault()->pick(mousePos);
|
||||
if (pick && pick->type() == editor_type())
|
||||
if (pick && pick->type() == Editor::Type())
|
||||
editor = static_cast<Editor*>(pick);
|
||||
|
||||
render::Zoom zoom = editor->zoom();
|
||||
|
@ -134,7 +134,7 @@ private:
|
||||
EditorRender* Editor::m_renderEngine = nullptr;
|
||||
|
||||
Editor::Editor(Doc* document, EditorFlags flags)
|
||||
: Widget(editor_type())
|
||||
: Widget(Editor::Type())
|
||||
, m_state(new StandbyState())
|
||||
, m_decorator(NULL)
|
||||
, m_document(document)
|
||||
@ -237,7 +237,8 @@ bool Editor::isActive() const
|
||||
return (current_editor == this);
|
||||
}
|
||||
|
||||
WidgetType editor_type()
|
||||
// static
|
||||
WidgetType Editor::Type()
|
||||
{
|
||||
static WidgetType type = kGenericWidget;
|
||||
if (type == kGenericWidget)
|
||||
|
@ -100,6 +100,8 @@ namespace app {
|
||||
MOUSE, // Zoom from cursor
|
||||
};
|
||||
|
||||
static ui::WidgetType Type();
|
||||
|
||||
Editor(Doc* document, EditorFlags flags = kDefaultEditorFlags);
|
||||
~Editor();
|
||||
|
||||
@ -456,8 +458,6 @@ namespace app {
|
||||
static EditorRender* m_renderEngine;
|
||||
};
|
||||
|
||||
ui::WidgetType editor_type();
|
||||
|
||||
} // namespace app
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user