Allow double click sticker edit

This commit is contained in:
Jaex 2018-02-07 13:45:56 +03:00
parent 9df4ad0a82
commit 0bed292339

View file

@ -50,11 +50,8 @@ public override void ShowNodes()
{
}
public override void OnCreating()
private void OpenStickerPicker(bool creating)
{
Point pos = InputManager.ClientMousePosition;
Rectangle = new Rectangle(pos.X, pos.Y, 1, 1);
Manager.Form.Pause();
try
@ -74,19 +71,40 @@ public override void OnCreating()
if (img != null)
{
SetImage(img, true);
OnCreated();
if (creating)
{
OnCreated();
}
return;
}
}
}
}
Remove();
if (creating)
{
Remove();
}
}
finally
{
Manager.Form.Resume();
}
}
public override void OnCreating()
{
Point pos = InputManager.ClientMousePosition;
Rectangle = new Rectangle(pos.X, pos.Y, 1, 1);
OpenStickerPicker(true);
}
public override void OnDoubleClicked()
{
OpenStickerPicker(false);
}
}
}