diff --git a/src/MainEditor/UI/TextureXEditor/PatchTablePanel.cpp b/src/MainEditor/UI/TextureXEditor/PatchTablePanel.cpp index eb004680b..89dd437e2 100644 --- a/src/MainEditor/UI/TextureXEditor/PatchTablePanel.cpp +++ b/src/MainEditor/UI/TextureXEditor/PatchTablePanel.cpp @@ -105,7 +105,7 @@ string PatchTableListView::getItemText(long item, long column, long index) const patch_t& patch = patch_table_->patch(index); if (column == 0) // Index column - return S_FMT("%04d", index); + return S_FMT("%04ld", index); else if (column == 1) // Name column return patch.name; else if (column == 2) // Usage count column diff --git a/src/MainEditor/UI/TextureXEditor/TextureXPanel.cpp b/src/MainEditor/UI/TextureXEditor/TextureXPanel.cpp index 81b86016e..de7c3e34f 100644 --- a/src/MainEditor/UI/TextureXEditor/TextureXPanel.cpp +++ b/src/MainEditor/UI/TextureXEditor/TextureXPanel.cpp @@ -1489,7 +1489,8 @@ void TextureXPanel::onRedo(string action) bool TextureXPanel::handleAction(string id) { // Don't handle if hidden - if (!tx_editor_->IsShown() || !IsShown()) + TabControl* parent = dynamic_cast(GetParent()); + if (parent->GetCurrentPage() != this) return false; // Only interested in "txed_" events