diff --git a/data/dialogs/doc-new.xml b/data/dialogs/doc-new.xml
index ed79e1f..29bafcc 100644
--- a/data/dialogs/doc-new.xml
+++ b/data/dialogs/doc-new.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/src/brush.cpp b/src/brush.cpp
index 74f08d4..44bf3a0 100644
--- a/src/brush.cpp
+++ b/src/brush.cpp
@@ -208,7 +208,6 @@ bool Brush::load_tip(const std::string& path, const std::string& thumb)
return false;
}
m_tip_texture->create_mipmaps();
- m_tip_texture->auto_destroy = true;
m_brush_path = path;
m_brush_thumb_path = thumb;
auto sz = m_tip_texture->size();
@@ -227,7 +226,6 @@ bool Brush::load_dual(const std::string& path, const std::string& thumb)
return false;
}
m_dual_texture->create_mipmaps();
- m_dual_texture->auto_destroy = true;
m_dual_path = path;
m_dual_thumb_path = thumb;
return true;
@@ -244,7 +242,6 @@ bool Brush::load_pattern(const std::string& path, const std::string& thumb)
return false;
}
m_pattern_texture->create_mipmaps();
- m_pattern_texture->auto_destroy = true;
m_pattern_path = path;
m_pattern_thumb_path = thumb;
return true;
@@ -265,7 +262,6 @@ bool Brush::load()
return false;
}
m_tip_texture->create_mipmaps();
- m_tip_texture->auto_destroy = true;
}
if (!m_dual_path.empty() && !m_dual_texture)
{
@@ -281,7 +277,6 @@ bool Brush::load()
return false;
}
m_dual_texture->create_mipmaps();
- m_dual_texture->auto_destroy = true;
}
if (!m_pattern_path.empty() && !m_pattern_texture)
{
@@ -298,7 +293,6 @@ bool Brush::load()
return false;
}
m_pattern_texture->create_mipmaps();
- m_pattern_texture->auto_destroy = true;
}
return true;
}
diff --git a/src/layout.cpp b/src/layout.cpp
index a0392bc..ee29865 100644
--- a/src/layout.cpp
+++ b/src/layout.cpp
@@ -67,8 +67,6 @@ bool LayoutManager::parse(const std::string& xml_string) noexcept
LOG("parsing xml failed");
}
- LOG("parsing loaded xml");
-
tinyxml2::XMLElement* current = xml.RootElement()->FirstChildElement();
while (current)
{
diff --git a/src/node_dialog_export_ppbr.cpp b/src/node_dialog_export_ppbr.cpp
index c27f224..27d1262 100644
--- a/src/node_dialog_export_ppbr.cpp
+++ b/src/node_dialog_export_ppbr.cpp
@@ -40,7 +40,7 @@ void NodeDialogExportPPBR::init_controls()
btn_header_clear = find("header-clear");
btn_header_clear->on_click = [this] (Node*) {
m_header_image.reset();
- img_header->tex->destroy();
+ img_header->tex.reset();
txt_header_descr->SetVisibility(true);
};
btn_header_gen = find("header-gen");
@@ -85,4 +85,5 @@ void NodeDialogExportPPBR::added(Node* parent)
NodeBorder::added(parent);
if (added_to_root())
mouse_capture();
+ txt_author->key_capture();
}
diff --git a/src/node_image.cpp b/src/node_image.cpp
index 4424057..2403937 100644
--- a/src/node_image.cpp
+++ b/src/node_image.cpp
@@ -156,7 +156,6 @@ void NodeImage::load_url(const std::string& url)
uint8_t* rgba = stbi_load_from_memory(m_remote_asset->m_data, m_remote_asset->m_len, &w, &h, &c, 4);
m_remote_texture = std::make_shared();
m_remote_texture->create(w, h, GL_RGBA8, GL_RGBA, rgba);
- m_remote_texture->auto_destroy = true;
if (m_use_mipmaps)
m_remote_texture->create_mipmaps();
delete rgba;
diff --git a/src/texture.cpp b/src/texture.cpp
index 3084459..167ba37 100644
--- a/src/texture.cpp
+++ b/src/texture.cpp
@@ -149,7 +149,6 @@ Texture2D::Texture2D(Texture2D&& other) noexcept
m_height = other.m_height;
m_format = other.m_format;
m_iformat = other.m_iformat;
- auto_destroy = other.auto_destroy;
has_mips = other.has_mips;
other.m_tex = false;
}
@@ -161,7 +160,6 @@ void Texture2D::operator=(Texture2D&& other) noexcept
m_height = other.m_height;
m_format = other.m_format;
m_iformat = other.m_iformat;
- auto_destroy = other.auto_destroy;
has_mips = other.has_mips;
other.m_tex = false;
}
@@ -271,11 +269,7 @@ glm::vec2 Texture2D::size() const
Texture2D::~Texture2D()
{
- //if (auto_destroy)
- {
- LOG("Texture2D auto destroy");
- destroy();
- }
+ destroy();
}
bool Sampler::create(GLint filter /*= GL_LINEAR*/, GLint wrap /*= GL_CLAMP_TO_EDGE*/)
diff --git a/src/texture.h b/src/texture.h
index c82ab15..eb0fea2 100644
--- a/src/texture.h
+++ b/src/texture.h
@@ -16,7 +16,6 @@ public:
void operator=(Texture2D&& other) noexcept;
~Texture2D();
- bool auto_destroy = false;
bool has_mips = false;
bool create(int width, int height, GLint internal_format = GL_RGBA8, GLint format = GL_RGBA, const uint8_t* data = nullptr);
bool create(const Image& img);