From: <ma...@us...> - 2003-11-30 21:04:41
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv31402 Modified Files: GUISettingsDlg.cpp Images.cpp MainDlg.cpp Log Message: Fixed `ToolBar Images get broken when changing iconset` bug. Index: GUISettingsDlg.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/GUISettingsDlg.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- GUISettingsDlg.cpp 27 Nov 2003 10:00:02 -0000 1.23 +++ GUISettingsDlg.cpp 30 Nov 2003 21:04:38 -0000 1.24 @@ -244,6 +244,7 @@ /* Update static bitmaps */ img->UpdateImages(mainframe); /* Recreate toolbar */ + img->MakeToolImages(); mainframe->CreateMyToolBar(); /* Update server page logbook */ serverwnd->SetLogBookImages(); Index: Images.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Images.cpp 29 Nov 2003 06:51:42 -0000 1.28 +++ Images.cpp 30 Nov 2003 21:04:38 -0000 1.29 @@ -218,7 +218,10 @@ tmp_mask = new wxMask(tmp_new, wxColour(0,0,0)); tmp_new.SetMask(tmp_mask); #endif - GetImage(btnimg.Item(i)) = tmp_new; + images.DeleteObject(&(GetImage(btnimg.Item(i)))); + wxBitmap *new_image = new wxBitmap(tmp_new); + images.Append(btnimg.Item(i), new_image); +// GetImage(btnimg.Item(i)) = tmp_new; } mdc.EndDrawing(); } Index: MainDlg.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- MainDlg.cpp 30 Nov 2003 20:38:36 -0000 1.18 +++ MainDlg.cpp 30 Nov 2003 21:04:38 -0000 1.19 @@ -63,9 +63,10 @@ int height, width, posx, posy; start_up = true; - /** - * Create toolbar and menubar - */ + /* Generate toolbar images */ + img->MakeToolImages(); + + /* Create toolbar and menubar */ CreateMyToolBar(); CreateMyMenuBar(); @@ -243,9 +244,6 @@ this, -1, wxDefaultPosition, wxDefaultSize, tool_align|wxNO_BORDER|wxTB_3DBUTTONS|wxTB_FLAT ); - - /* Generate toolbar images */ - img->MakeToolImages(); tb->SetToolBitmapSize(wxSize(img->tool_img_width, img->tool_img_height)); tb->SetMargins(2, 2); |