update color at picking and cleanup code from some warnings

This commit is contained in:
2019-03-11 15:35:59 +01:00
parent 373e7ad0e9
commit fda399f7dd
16 changed files with 56 additions and 63 deletions

View File

@@ -298,7 +298,7 @@ bool NodePanelBrush::save()
sw.wstring_raw("PPVR"); // magic code
sw.wu16(0); // version major
sw.wu16(1); // minor
sw.wu32(m_container->m_children.size()); // number of items
sw.wu32((int)m_container->m_children.size()); // number of items
for (const auto& child : m_container->m_children)
{
auto b = std::static_pointer_cast<NodeButtonBrush>(child);
@@ -331,7 +331,7 @@ bool NodePanelBrush::restore()
auto vmin = sr.ru16();
if (vmaj != 0 && vmin != 1)
{
LOG("unrecognised version %d.$d", vmaj, vmin);
LOG("unrecognised version %d.%d", vmaj, vmin);
return false;
}
@@ -448,7 +448,7 @@ void NodePanelBrushPreset::init()
}
else
{
int next = std::min<int>(m_container->m_children.size() - 1, index);
int next = std::min<int>((int)m_container->m_children.size() - 1, index);
m_current = (NodeBrushPresetItem*)m_container->m_children[next].get();
m_current->m_selected = true;
}
@@ -515,7 +515,7 @@ bool NodePanelBrushPreset::save()
sw.wstring_raw("PPVR");
sw.wu16(0);
sw.wu16(1);
sw.wu32(m_container->m_children.size());
sw.wu32((int)m_container->m_children.size());
for (int ci = 0; ci < m_container->m_children.size(); ci++)
{
auto bpi = static_cast<NodeBrushPresetItem*>(m_container->get_child_at(ci));