I use it with small snippet directly in snippet data file (no external file). Theses snippets are opened in a temporary file. During save command, data are save back on XML data but not saved on disk
I've tracked down and it's related to end of function
// ----------------------------------------------------------------------------
void CodeSnippetsTreeCtrl::SaveEditorsXmlData(cbEditor* pcbEditor)
// ----------------------------------------------------------------------------
{//asm("int3"); /*trap*/
int idx = m_EditorPtrArray.Index(pcbEditor);
if (wxNOT_FOUND == idx)
return;
wxTreeItemId snippetID = m_EditorSnippetIdArray[idx];
//Is this an XML snippet, as opposed to a FileLink or URL snippet
SnippetTreeItemData* pSnippetTreeItemData = (SnippetTreeItemData*)(GetItemData(snippetID));
//-if (pSnippetTreeItemData->IsSnippetFile())
//- return;
pSnippetTreeItemData->SetSnippetString(pcbEditor->GetControl()->GetText());
//-wrong--SetItemText(snippetID, pcbEditor->GetName());
// Must be set to ensure file is correctly saved
SetFileChanged(true);
}
SetFileChanged was commented out. It's the problem, but there is probably a another case (that I don't see), where it should be commented ?