curl timeout, reorder layers, handle right click osx
This commit is contained in:
@@ -1383,6 +1383,7 @@ public:
|
||||
std::function<void(Node* target, int idx, float value)> on_layer_opacity_changed;
|
||||
std::function<void(Node* target, int index)> on_layer_delete;
|
||||
std::function<void(Node* target)> on_layer_add;
|
||||
std::function<void(Node* target, int old_idx, int new_idx)> on_layer_order;
|
||||
NodeLayer* m_current_layer = nullptr;
|
||||
std::vector<NodeLayer*> m_layers;
|
||||
NodeBorder* m_layers_container;
|
||||
@@ -1415,11 +1416,23 @@ public:
|
||||
return; // dont' delete the last layer
|
||||
remove_layer(m_current_layer);
|
||||
};
|
||||
btn_up->on_click = [this](Node*) {
|
||||
btn_up->on_click = [this](Node*) {
|
||||
int old_idx = m_layers_container->get_child_index(m_current_layer);
|
||||
m_layers_container->move_child_offset(m_current_layer, -1);
|
||||
int new_idx = m_layers_container->get_child_index(m_current_layer);
|
||||
if (on_layer_order && old_idx != new_idx)
|
||||
{
|
||||
on_layer_order(this, old_idx, new_idx);
|
||||
}
|
||||
};
|
||||
btn_down->on_click = [this](Node*) {
|
||||
m_layers_container->move_child_offset(m_current_layer, +1);
|
||||
int old_idx = m_layers_container->get_child_index(m_current_layer);
|
||||
m_layers_container->move_child_offset(m_current_layer, +1);
|
||||
int new_idx = m_layers_container->get_child_index(m_current_layer);
|
||||
if (on_layer_order && old_idx != new_idx)
|
||||
{
|
||||
on_layer_order(this, old_idx, new_idx);
|
||||
}
|
||||
};
|
||||
LOG("done init");
|
||||
}
|
||||
@@ -1945,7 +1958,7 @@ public:
|
||||
auto blend = glIsEnabled(GL_BLEND);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
for (int i = 0; i < m_canvas->m_layers.size(); i++)
|
||||
for (auto i : m_canvas->m_order)
|
||||
{
|
||||
if (!(m_canvas->m_erase && m_canvas->m_show_tmp && m_canvas->m_current_layer_idx == i))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user