diff --git a/api/txf_util.C b/api/txf_util.C index d4dee78910..c71f9cb480 100644 --- a/api/txf_util.C +++ b/api/txf_util.C @@ -50,7 +50,7 @@ void txf_load_fonts(char* dir) { fprintf(stderr, "Successfully loaded '%s'...\n", phys_path); CreateTexFont(txf[i], 0, GL_TRUE); } else { - fprintf(stderr, "Failed to load '%s' error message: '%s'...\n", phys_path, txfErrorString); + fprintf(stderr, "Failed to load '%s' error message: '%s'...\n", phys_path, txfErrorString()); } } } diff --git a/checkin_notes b/checkin_notes index c5105fbdeb..c352306755 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2362,3 +2362,12 @@ David Mar 13 2008 transitioner.C validate_util2.C,h validator.C + +Charlie Mar 13 2008 + MGR: Fix flicker in projects tab website buttons. + API: fix a compiler warning which was an actual logic error. + + clientgui/ + ViewProjectsGrid.cpp + api/ + texfont.C diff --git a/clientgui/ViewProjectsGrid.cpp b/clientgui/ViewProjectsGrid.cpp index 8bc209d744..cb60ee154f 100644 --- a/clientgui/ViewProjectsGrid.cpp +++ b/clientgui/ViewProjectsGrid.cpp @@ -613,51 +613,55 @@ void CViewProjectsGrid::UpdateWebsiteSelection(long lControlGroup, PROJECT* proj // Update the websites list // - if (m_TaskGroups.size() > 1) { + if (m_bForceUpdateSelection) { + if (m_TaskGroups.size() > 1) { - // Delete task group, objects, and controls. - pGroup = m_TaskGroups[lControlGroup]; + // Delete task group, objects, and controls. + pGroup = m_TaskGroups[lControlGroup]; - m_pTaskPane->DeleteTaskGroupAndTasks(pGroup); - for (i=0; im_Tasks.size(); i++) { - delete pGroup->m_Tasks[i]; + m_pTaskPane->DeleteTaskGroupAndTasks(pGroup); + for (i=0; im_Tasks.size(); i++) { + delete pGroup->m_Tasks[i]; + } + pGroup->m_Tasks.clear(); + delete pGroup; + + pGroup = NULL; + + m_TaskGroups.erase( m_TaskGroups.begin() + 1 ); } - pGroup->m_Tasks.clear(); - delete pGroup; - pGroup = NULL; + // If something is selected create the tasks and controls + if (m_pGridPane->GetSelectedRows2().size()==1) { + if (project) { + // Create the web sites task group + pGroup = new CTaskItemGroup( _("Web sites") ); + m_TaskGroups.push_back( pGroup ); - m_TaskGroups.erase( m_TaskGroups.begin() + 1 ); - } - - // If something is selected create the tasks and controls - if (m_pGridPane->GetSelectedRows2().size()==1) { - if (project) { - // Create the web sites task group - pGroup = new CTaskItemGroup( _("Web sites") ); - m_TaskGroups.push_back( pGroup ); - - // Default project url - pItem = new CTaskItem( - wxString(project->project_name.c_str(), wxConvUTF8), - wxT(""), - wxString(project->master_url.c_str(), wxConvUTF8), - ID_TASK_PROJECT_WEB_PROJDEF_MIN - ); - pGroup->m_Tasks.push_back(pItem); - - - // Project defined urls - for (i=0;(igui_urls.size())&&(i<=ID_TASK_PROJECT_WEB_PROJDEF_MAX);i++) { + // Default project url pItem = new CTaskItem( - wxGetTranslation(wxString(project->gui_urls[i].name.c_str(), wxConvUTF8)), - wxGetTranslation(wxString(project->gui_urls[i].description.c_str(), wxConvUTF8)), - wxString(project->gui_urls[i].url.c_str(), wxConvUTF8), - ID_TASK_PROJECT_WEB_PROJDEF_MIN + 1 + i + wxString(project->project_name.c_str(), wxConvUTF8), + wxT(""), + wxString(project->master_url.c_str(), wxConvUTF8), + ID_TASK_PROJECT_WEB_PROJDEF_MIN ); pGroup->m_Tasks.push_back(pItem); + + + // Project defined urls + for (i=0;(igui_urls.size())&&(i<=ID_TASK_PROJECT_WEB_PROJDEF_MAX);i++) { + pItem = new CTaskItem( + wxGetTranslation(wxString(project->gui_urls[i].name.c_str(), wxConvUTF8)), + wxGetTranslation(wxString(project->gui_urls[i].description.c_str(), wxConvUTF8)), + wxString(project->gui_urls[i].url.c_str(), wxConvUTF8), + ID_TASK_PROJECT_WEB_PROJDEF_MIN + 1 + i + ); + pGroup->m_Tasks.push_back(pItem); + } } } + + m_bForceUpdateSelection = false; } }