Set wxTextAreaBase::m_filename in the methods of this class itself.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 27 Mar 2012 11:58:09 +0000 (11:58 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 27 Mar 2012 11:58:09 +0000 (11:58 +0000)
commit90761420ee8333764c0e5662d5616c5794acbe5b
tree33f22e43fae049a4b641729f794035221edb2eab
parentdace99a4efdbf2bd93f26fd35fe7630a835ca711
Set wxTextAreaBase::m_filename in the methods of this class itself.

m_filename member was declared in wxTextAreaBase but set only in the
overridden wxTextCtrlBase methods. This meant that it wasn't updated correctly
in wxStyledTextCtrl which also derives from wxTextAreaBase and so saving
SaveFile() with empty file name didn't work there even when the control had
been originally loaded from a file.

Move the code updating m_filename to wxTextAreaBase itself to fix this. This
also simplifies the code as it's now not necessary to override
Do{Load,Save}File() in wxTextCtrlBase at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/textctrl.h
src/common/textcmn.cpp