Move datagrid reset logic to data_grid class

This commit is contained in:
Timothy Warren 2012-03-30 10:13:16 -04:00
parent a199784934
commit 53652d62b4
2 changed files with 7 additions and 7 deletions

View File

@ -67,6 +67,13 @@ class Data_Grid extends GtkTreeView {
public function reset($model = null) public function reset($model = null)
{ {
$this->model->clear(); $this->model->clear();
$cols = $this->get_columns();
foreach($cols as $c)
{
$this->remove_column($c);
}
} }
} }
// End of data_grid.php // End of data_grid.php

View File

@ -253,13 +253,6 @@ class Connection_Sidebar extends GtkVBox {
public function refresh() public function refresh()
{ {
$this->treeview->reset(); $this->treeview->reset();
$cols = $this->treeview->get_columns();
foreach($cols as $c)
{
$this->treeview->remove_column($c);
}
$this->_render(); $this->_render();
} }