Re: Refreshing a Treeview within a modeless dialog window: How?
- From: allen777 <Allen Saucier itt com>
- To: gtkmm-list gnome org
- Subject: Re: Refreshing a Treeview within a modeless dialog window: How?
- Date: Thu, 12 Mar 2009 08:24:57 -0700 (PDT)
For those who care, I have learned:
1. DON'T attempt to "update" a row in a treeview through ANOTHER THREAD
that is OUTSIDE
the main gtkmm gui thread.
2. If update a row's value while IN THE MAIN gui THREAD, it works just fine
setting the
row to a new value - updates automatically.
More notes to come....
allen777 wrote:
>
>
> void CEntitiesDisplayControls::m_vUpdateAirEntity(std::string &p_sName,
> double p_dPosX, double p_dPosY, double p_dPosZ, double p_dDistance)
> {
> //1st: search all rows for this entity name
> std::string s3;
> Gtk::TreeModel::Children allRows = m_trstTreeviewModel->children();
> Gtk::TreeModel::Children::iterator itrAllRows = allRows.begin();
> for(; itrAllRows!=allRows.end(); ++itrAllRows)
> {
> Gtk::TreeModel::Row row = *itrAllRows;
> Gtk::TreeModel::Children allSubRows= row.children();
> for (Gtk::TreeModel::Children::iterator itrSubRow=allSubRows.begin();
> itrSubRow != allSubRows.end(); ++itrSubRow)
> {
> Gtk::TreeModel::Row subRow = *itrSubRow;
> if ( (s3=subRow[m_cModelColumns.m_colName]) == p_sName)
> {
> subRow[m_cModelColumns.m_colPosX] =
> CUtilityFuncs::m_strDoubleToString(p_dPosX,
> CUtilityFuncs::g_iFIXED_NOTATION, 3);
> subRow[m_cModelColumns.m_colPosY] =
> CUtilityFuncs::m_strDoubleToString(p_dPosY,
> CUtilityFuncs::g_iFIXED_NOTATION, 3);
> subRow[m_cModelColumns.m_colPosZ] =
> CUtilityFuncs::m_strDoubleToString(p_dPosZ,
> CUtilityFuncs::g_iFIXED_NOTATION, 3);
> // subRow->set_value(m_cModelColumns.m_colPosX,
> CUtilityFuncs::m_strDoubleToString(p_dPosX,
> CUtilityFuncs::g_iFIXED_NOTATION, 3));
> // Gtk::TreeModel::Path p=m_trstTreeviewModel->get_path(itrSubRow);
> // m_trstTreeviewModel->row_changed(p, itrSubRow);
> // m_vUpdateGUI();
> }// if found matching air entity name
> } // for itrRowChildren
> } // for itr
> } // m_vUpdateAirEntity
>
>
>
>
>
--
View this message in context: http://www.nabble.com/Refreshing-a-Treeview-within-a-modeless-dialog-window%3A--How--tp22459430p22478222.html
Sent from the Gtkmm mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]