wxAuiManagerUpdatePerspectiveCaptions() update

This commit is contained in:
Simon Rozman 2016-10-18 14:26:39 +02:00
parent 636e7acc1b
commit 525f24674e
2 changed files with 11 additions and 11 deletions

View File

@ -24,14 +24,14 @@
/// ///
/// wxExtend Version /// wxExtend Version
/// ///
#define wxEXTEND_VERSION 0x01050000 #define wxEXTEND_VERSION 0x01050100
#define wxEXTEND_VERSION_MAJ 1 #define wxEXTEND_VERSION_MAJ 1
#define wxEXTEND_VERSION_MIN 5 #define wxEXTEND_VERSION_MIN 5
#define wxEXTEND_VERSION_REV 0 #define wxEXTEND_VERSION_REV 1
#define wxEXTEND_VERSION_BUILD 0 #define wxEXTEND_VERSION_BUILD 0
#define wxEXTEND_VERSION_STR "1.5" #define wxEXTEND_VERSION_STR "1.5.1"
#define wxEXTEND_BUILD_YEAR_STR "2016" #define wxEXTEND_BUILD_YEAR_STR "2016"
#define wxExtendVersion "15" #define wxExtendVersion "15"

View File

@ -24,7 +24,6 @@
bool WXEXTEND_API wxAuiManagerUpdatePerspectiveCaptions(wxAuiManager& mgr, wxString& perspective) bool WXEXTEND_API wxAuiManagerUpdatePerspectiveCaptions(wxAuiManager& mgr, wxString& perspective)
{ {
wxString input = perspective; wxString input = perspective;
wxString output;
wxString part; wxString part;
// check layout string version // check layout string version
@ -36,8 +35,10 @@ bool WXEXTEND_API wxAuiManagerUpdatePerspectiveCaptions(wxAuiManager& mgr, wxStr
part.Trim(false); part.Trim(false);
if (part != wxT("layout2")) if (part != wxT("layout2"))
return false; return false;
output += part;
output += wxT('|'); wxString result;
result.Alloc(500);
result = wxT('layout2|');
// replace escaped characters so we can // replace escaped characters so we can
// split up the string easily // split up the string easily
@ -60,8 +61,7 @@ bool WXEXTEND_API wxAuiManagerUpdatePerspectiveCaptions(wxAuiManager& mgr, wxStr
if (pane_part.Left(9) == wxT("dock_size")) if (pane_part.Left(9) == wxT("dock_size"))
{ {
output += pane_part; result += pane_part + wxT('|');
output += wxT('|');
continue; continue;
} }
@ -79,10 +79,10 @@ bool WXEXTEND_API wxAuiManagerUpdatePerspectiveCaptions(wxAuiManager& mgr, wxStr
// Update caption. // Update caption.
pane.caption = p.caption; pane.caption = p.caption;
output += mgr.SavePaneInfo(pane); // Re-generate and append pane info.
output += wxT('|'); result += mgr.SavePaneInfo(pane) + wxT('|');
} }
perspective = output; perspective = result;
return true; return true;
} }