Skip to content

Commit

Permalink
Merge branch 'topic/single-colour-lights'
Browse files Browse the repository at this point in the history
Merge completed #5364 which adds a checkbox in the Colours dialog to force all
light volumes to be rendered with a single colour set by the colour scheme,
rather than changing colour based on the _color spawnarg.
  • Loading branch information
Matthew Mott committed Dec 22, 2020
2 parents 737a8ae + deaea8a commit e357a35
Show file tree
Hide file tree
Showing 46 changed files with 309 additions and 336 deletions.
10 changes: 10 additions & 0 deletions include/icolourscheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
namespace colours
{

/**
* Registry key set when light volumes should be rendered in a single colour
* set by the colourscheme, rather than the colour contained in their _color
* key.
*/
constexpr const char* RKEY_OVERRIDE_LIGHTCOL = "user/ui/colour/overrideLightColour";

class IColourItem
{
public:
Expand All @@ -17,6 +24,7 @@ class IColourItem
virtual Vector3& getColour() = 0;
};

/// Interface for a single colour scheme
class IColourScheme
{
public:
Expand All @@ -36,6 +44,7 @@ class IColourScheme
virtual bool isReadOnly() const = 0;
};

/// Module providing access to current and available colour schemes
class IColourSchemeManager :
public RegisterableModule
{
Expand All @@ -53,6 +62,7 @@ class IColourSchemeManager :

virtual void setActive(const std::string& name) = 0;

/// Get a reference to the currently active colour scheme
virtual IColourScheme& getActiveScheme() = 0;

// greebo: Returns the named colour, returns <0,0,0> if not found
Expand Down
2 changes: 1 addition & 1 deletion libs/wxutil/EntityClassChooser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ void EntityClassChooser::setupTreeView()

wxPanel* parent = findNamedObject<wxPanel>(this, "EntityClassChooserLeftPane");

_treeView = wxutil::TreeView::CreateWithModel(parent, _treeStore);
_treeView = wxutil::TreeView::CreateWithModel(parent, _treeStore.get());
_treeView->AddSearchColumn(_columns.name);

_treeView->Bind(wxEVT_DATAVIEW_SELECTION_CHANGED, &EntityClassChooser::onSelectionChanged, this);
Expand Down
2 changes: 1 addition & 1 deletion libs/wxutil/KeyValueTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Columns& COLUMNS()
}

KeyValueTable::KeyValueTable(wxWindow* parent) :
wxutil::TreeView(parent, TreeModel::Ptr(), wxDV_NO_HEADER | wxDV_SINGLE),
wxutil::TreeView(parent, nullptr, wxDV_NO_HEADER | wxDV_SINGLE),
_store(new wxutil::TreeModel(COLUMNS(), true)) // list model
{
AssociateModel(_store.get());
Expand Down
10 changes: 4 additions & 6 deletions libs/wxutil/TreeView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ class TreeView::Search :
void _onTreeViewCharHook(wxKeyEvent& keyEvent);
};

TreeView::TreeView(wxWindow* parent, const TreeModel::Ptr& model, long style) :
TreeView::TreeView(wxWindow* parent, wxDataViewModel* model, long style) :
wxDataViewCtrl(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, style),
_collapseRecursively(true)
{
EnableAutoColumnWidthFix();

if (model)
{
AssociateModel(model.get());
AssociateModel(model);
}

Bind(wxEVT_CHAR, &TreeView::_onChar, this);
Expand All @@ -67,12 +67,10 @@ TreeView::TreeView(wxWindow* parent, const TreeModel::Ptr& model, long style) :

TreeView* TreeView::Create(wxWindow* parent, long style)
{
return new TreeView(parent, TreeModel::Ptr(), style);
return new TreeView(parent, nullptr, style);
}

// Construct a TreeView using the given TreeModel, which will be associated
// with this view (refcount is automatically decreased by one).
TreeView* TreeView::CreateWithModel(wxWindow* parent, const TreeModel::Ptr& model, long style)
TreeView* TreeView::CreateWithModel(wxWindow* parent, wxDataViewModel* model, long style)
{
return new TreeView(parent, model, style);
}
Expand Down
17 changes: 13 additions & 4 deletions libs/wxutil/TreeView.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,26 @@ class TreeView :

bool _collapseRecursively;

TreeView(wxWindow* parent, const TreeModel::Ptr& model, long style);
TreeView(wxWindow* parent, wxDataViewModel* model, long style);

public:
typedef wxWindowPtr<TreeView> Ptr;

// Create a TreeView without model (single-selection mode)
static TreeView* Create(wxWindow* parent, long style = wxDV_SINGLE);

// Construct a TreeView using the given TreeModel, which will be associated
// with this view (refcount is automatically decreased by one).
static TreeView* CreateWithModel(wxWindow* parent, const TreeModel::Ptr& model, long style = wxDV_SINGLE);
/**
* \brief
* Construct a TreeView with an associated model
*
* \param parent
* The parent window of the tree view widget
*
* \param model
* Data model to supply data for the tree view. May be null.
*/
static TreeView* CreateWithModel(wxWindow* parent, wxDataViewModel* model,
long style = wxDV_SINGLE);

virtual ~TreeView();

Expand Down
2 changes: 1 addition & 1 deletion libs/wxutil/fsview/FileSystemView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bool FileSystemView::SelectionChangedEvent::SelectionIsFolder()
}

FileSystemView::FileSystemView(wxWindow* parent, const TreeModel::Ptr& model, long style) :
TreeView(parent, model, style),
TreeView(parent, model.get(), style),
_treeStore(model),
_fileIcon(DEFAULT_FILE_ICON)
{
Expand Down
4 changes: 2 additions & 2 deletions plugins/dm.conversation/ConversationDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void ConversationDialog::populateWindow()
wxPanel* entityPanel = findNamedObject<wxPanel>(this, "ConvDialogEntityPanel");

// Entity Tree View
_entityView = wxutil::TreeView::CreateWithModel(entityPanel, _entityList, wxDV_NO_HEADER);
_entityView = wxutil::TreeView::CreateWithModel(entityPanel, _entityList.get(), wxDV_NO_HEADER);
entityPanel->GetSizer()->Add(_entityView, 1, wxEXPAND);

_entityView->AppendTextColumn("", _convEntityColumns.displayName.getColumnIndex(),
Expand All @@ -78,7 +78,7 @@ void ConversationDialog::populateWindow()

wxPanel* convPanel = findNamedObject<wxPanel>(this, "ConvDialogConversationPanel");

_convView = wxutil::TreeView::CreateWithModel(convPanel, _convList);
_convView = wxutil::TreeView::CreateWithModel(convPanel, _convList.get());

// Key and value text columns
_convView->AppendTextColumn("#", _convColumns.index.getColumnIndex(),
Expand Down
4 changes: 2 additions & 2 deletions plugins/dm.conversation/ConversationEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void ConversationEditor::populateWindow()
// Actor Panel
wxPanel* actorPanel = findNamedObject<wxPanel>(this, "ConvEditorActorPanel");

_actorView = wxutil::TreeView::CreateWithModel(actorPanel, _actorStore);
_actorView = wxutil::TreeView::CreateWithModel(actorPanel, _actorStore.get());
_actorView->SetSize(wxSize(350, 160));
actorPanel->GetSizer()->Add(_actorView, 1, wxEXPAND);

Expand Down Expand Up @@ -112,7 +112,7 @@ void ConversationEditor::populateWindow()
// Command Panel
wxPanel* commandPanel = findNamedObject<wxPanel>(this, "ConvEditorCommandPanel");

_commandView = wxutil::TreeView::CreateWithModel(commandPanel, _commandStore);
_commandView = wxutil::TreeView::CreateWithModel(commandPanel, _commandStore.get());
_commandView->SetSize(wxSize(350, 200));
commandPanel->GetSizer()->Add(_commandView, 1, wxEXPAND);

Expand Down
2 changes: 1 addition & 1 deletion plugins/dm.difficulty/DifficultyEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void DifficultyEditor::populateWindow()

wxPanel* viewPanel = findNamedObject<wxPanel>(_editor, "DifficultyEditorTreeViewPanel");

_settingsView = wxutil::TreeView::CreateWithModel(viewPanel, _settings->getTreeStore());
_settingsView = wxutil::TreeView::CreateWithModel(viewPanel, _settings->getTreeStore().get());
_settingsView->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED,
wxDataViewEventHandler(DifficultyEditor::onSettingSelectionChange), NULL, this);
viewPanel->GetSizer()->Add(_settingsView, 1, wxEXPAND);
Expand Down
2 changes: 1 addition & 1 deletion plugins/dm.editing/AIHeadChooserDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ AIHeadChooserDialog::AIHeadChooserDialog() :
GetSizer()->Add(splitter, 1, wxEXPAND | wxALL, 12);
GetSizer()->Add(CreateStdDialogButtonSizer(wxOK | wxCANCEL), 0, wxALIGN_RIGHT | wxBOTTOM | wxRIGHT, 12);

_headsView = wxutil::TreeView::CreateWithModel(splitter, _headStore, wxDV_NO_HEADER);
_headsView = wxutil::TreeView::CreateWithModel(splitter, _headStore.get(), wxDV_NO_HEADER);
_headsView->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED,
wxDataViewEventHandler(AIHeadChooserDialog::onHeadSelectionChanged), NULL, this);

Expand Down
2 changes: 1 addition & 1 deletion plugins/dm.editing/AIVocalSetChooserDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ AIVocalSetChooserDialog::AIVocalSetChooserDialog() :
_preview = new AIVocalSetPreview(this);
}

_setView = wxutil::TreeView::CreateWithModel(this, _setStore, wxDV_NO_HEADER);
_setView = wxutil::TreeView::CreateWithModel(this, _setStore.get(), wxDV_NO_HEADER);
_setView->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED,
wxDataViewEventHandler(AIVocalSetChooserDialog::onSetSelectionChanged), NULL, this);

Expand Down
2 changes: 1 addition & 1 deletion plugins/dm.editing/MissionInfoEditDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void MissionInfoEditDialog::populateWindow()
// Replace the list control with our own TreeView
wxWindow* existing = findNamedObject<wxWindow>(this, "MissionInfoEditDialogMissionTitleList");

_missionTitleView = wxutil::TreeView::CreateWithModel(existing->GetParent(), _missionTitleStore, wxDV_SINGLE);
_missionTitleView = wxutil::TreeView::CreateWithModel(existing->GetParent(), _missionTitleStore.get(), wxDV_SINGLE);

_missionTitleView->SetName("MissionInfoEditDialogMissionTitleList");
_missionTitleView->SetMinSize(wxSize(-1, 150));
Expand Down
4 changes: 2 additions & 2 deletions plugins/dm.gui/GuiSelector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void GuiSelector::populateWindow()

// One-Sided Readables Tab
auto tempOneSidedModel = wxutil::TreeModel::Ptr(new wxutil::TreeModel(_columns));
_oneSidedView = wxutil::TreeView::CreateWithModel(_notebook, tempOneSidedModel, wxDV_NO_HEADER);
_oneSidedView = wxutil::TreeView::CreateWithModel(_notebook, tempOneSidedModel.get(), wxDV_NO_HEADER);
_oneSidedView->AppendIconTextColumn(_("Gui Path"), _columns.name.getColumnIndex(),
wxDATAVIEW_CELL_INERT, wxCOL_WIDTH_AUTOSIZE, wxALIGN_NOT, wxDATAVIEW_COL_SORTABLE);
_oneSidedView->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED,
Expand All @@ -148,7 +148,7 @@ void GuiSelector::populateWindow()

// Two-Sided Readables Tab
auto tempTwoSidedModel = wxutil::TreeModel::Ptr(new wxutil::TreeModel(_columns));
_twoSidedView = wxutil::TreeView::CreateWithModel(_notebook, tempTwoSidedModel, wxDV_NO_HEADER);
_twoSidedView = wxutil::TreeView::CreateWithModel(_notebook, tempTwoSidedModel.get(), wxDV_NO_HEADER);
_twoSidedView->AppendIconTextColumn(_("Gui Path"), _columns.name.getColumnIndex(),
wxDATAVIEW_CELL_INERT, wxCOL_WIDTH_AUTOSIZE, wxALIGN_NOT, wxDATAVIEW_COL_SORTABLE);
_twoSidedView->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED,
Expand Down
2 changes: 1 addition & 1 deletion plugins/dm.gui/XDataSelector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ XDataSelector::XDataSelector(const XData::StringVectorMap& files, ReadableEditor
GetSizer()->Add(vbox, 1, wxEXPAND | wxALL, 12);

// Create the treeview
_view = wxutil::TreeView::CreateWithModel(this, _store, wxDV_NO_HEADER);
_view = wxutil::TreeView::CreateWithModel(this, _store.get(), wxDV_NO_HEADER);

_view->AppendIconTextColumn(_("Xdata Path"), _columns.name.getColumnIndex(),
wxDATAVIEW_CELL_INERT, wxCOL_WIDTH_AUTOSIZE, wxALIGN_NOT, wxDATAVIEW_COL_SORTABLE);
Expand Down
2 changes: 1 addition & 1 deletion plugins/dm.gui/XdFileChooserDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ XdFileChooserDialog::XdFileChooserDialog(const std::string& defName,
_("The requested definition has been found in multiple Files. Choose the file:"));

// Create the list of files:
_treeview = wxutil::TreeView::CreateWithModel(this, _listStore, wxDV_NO_HEADER);
_treeview = wxutil::TreeView::CreateWithModel(this, _listStore.get(), wxDV_NO_HEADER);

_treeview->AppendTextColumn(_("File"), _columns.name.getColumnIndex(),
wxDATAVIEW_CELL_INERT, wxCOL_WIDTH_AUTOSIZE, wxALIGN_NOT, wxDATAVIEW_COL_SORTABLE);
Expand Down
2 changes: 1 addition & 1 deletion plugins/dm.objectives/ComponentsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void ComponentsDialog::createListView()
{
// Create tree view and connect selection changed callback
wxPanel* treeViewPanel = findNamedObject<wxPanel>(this, "ObjCompListViewPanel");
_componentView = wxutil::TreeView::CreateWithModel(treeViewPanel, _componentList);
_componentView = wxutil::TreeView::CreateWithModel(treeViewPanel, _componentList.get());
treeViewPanel->GetSizer()->Add(_componentView, 1, wxEXPAND);
treeViewPanel->SetMinClientSize(wxSize(-1, 90));

Expand Down
2 changes: 1 addition & 1 deletion plugins/dm.objectives/ObjectiveConditionsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void ObjectiveConditionsDialog::setupConditionsPanel()
wxPanel* condPanel = findNamedObject<wxPanel>(this, "ObjCondDialogConditionViewPanel");

// Tree view listing the conditions
_conditionsView = wxutil::TreeView::CreateWithModel(condPanel, _objectiveConditionList, wxDV_NO_HEADER);
_conditionsView = wxutil::TreeView::CreateWithModel(condPanel, _objectiveConditionList.get(), wxDV_NO_HEADER);
condPanel->GetSizer()->Add(_conditionsView, 1, wxEXPAND);

_conditionsView->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED,
Expand Down
4 changes: 2 additions & 2 deletions plugins/dm.objectives/ObjectivesEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void ObjectivesEditor::setupEntitiesPanel()
wxPanel* entityPanel = findNamedObject<wxPanel>(this, "ObjDialogEntityPanel");

// Entity Tree View
_objectiveEntityView = wxutil::TreeView::CreateWithModel(entityPanel, _objectiveEntityList, wxDV_NO_HEADER);
_objectiveEntityView = wxutil::TreeView::CreateWithModel(entityPanel, _objectiveEntityList.get(), wxDV_NO_HEADER);
entityPanel->GetSizer()->Add(_objectiveEntityView, 1, wxEXPAND);

_objectiveEntityView->AppendToggleColumn(_("Start"), _objEntityColumns.startActive.getColumnIndex(),
Expand Down Expand Up @@ -124,7 +124,7 @@ void ObjectivesEditor::setupObjectivesPanel()
wxPanel* panel = findNamedObject<wxPanel>(this, "ObjDialogObjectivesPanel");

// Entity Tree View
_objectiveView = wxutil::TreeView::CreateWithModel(panel, _objectiveList);
_objectiveView = wxutil::TreeView::CreateWithModel(panel, _objectiveList.get());
panel->GetSizer()->Add(_objectiveView, 1, wxEXPAND);

// Key and value text columns
Expand Down
2 changes: 1 addition & 1 deletion plugins/dm.stimresponse/ClassEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void ClassEditor::createListView(wxWindow* parent)
new wxutil::TreeModel(SREntity::getColumns(), true)
);

_list = wxutil::TreeView::CreateWithModel(parent, dummyModel);
_list = wxutil::TreeView::CreateWithModel(parent, dummyModel.get());

_list->SetMinClientSize(wxSize(TREE_VIEW_WIDTH, TREE_VIEW_HEIGHT));
parent->GetSizer()->Add(_list, 1, wxEXPAND);
Expand Down
2 changes: 1 addition & 1 deletion plugins/dm.stimresponse/ResponseEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void ResponseEditor::createEffectWidgets()
wxutil::TreeModel::Ptr dummyModel(
new wxutil::TreeModel(StimResponse::getColumns(), true)
);
_effectWidgets.view = wxutil::TreeView::CreateWithModel(effectsPanel, dummyModel);
_effectWidgets.view = wxutil::TreeView::CreateWithModel(effectsPanel, dummyModel.get());

_effectWidgets.view->SetMinClientSize(wxSize(-1, 150));
effectsPanel->GetSizer()->Add(_effectWidgets.view, 1, wxEXPAND);
Expand Down
2 changes: 1 addition & 1 deletion radiant/ui/commandlist/CommandList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void CommandList::populateWindow()
// Create a new liststore item and define its columns
_listStore = new wxutil::TreeModel(_columns, true);

_treeView = wxutil::TreeView::CreateWithModel(this, _listStore);
_treeView = wxutil::TreeView::CreateWithModel(this, _listStore.get());

_treeView->AppendTextColumn(_("Command"), _columns.command.getColumnIndex(),
wxDATAVIEW_CELL_INERT, wxCOL_SORTABLE | wxCOL_WIDTH_AUTOSIZE, wxALIGN_NOT, wxDATAVIEW_COL_SORTABLE);
Expand Down
2 changes: 1 addition & 1 deletion radiant/ui/common/ShaderSelector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void ShaderSelector::createTreeView()
populator.forEachNode(inserter);

// Tree view
_treeView = wxutil::TreeView::CreateWithModel(this, _treeStore, wxDV_NO_HEADER | wxDV_SINGLE);
_treeView = wxutil::TreeView::CreateWithModel(this, _treeStore.get(), wxDV_NO_HEADER | wxDV_SINGLE);

// Single visible column, containing the directory/shader name and the icon
_treeView->AppendIconTextColumn(_("Value"), _shaderTreeColumns.iconAndName.getColumnIndex(),
Expand Down
4 changes: 2 additions & 2 deletions radiant/ui/eclasstree/EClassTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void EClassTree::populateWindow()

void EClassTree::createEClassTreeView(wxWindow* parent)
{
_eclassView = wxutil::TreeView::CreateWithModel(parent, _eclassStore);
_eclassView = wxutil::TreeView::CreateWithModel(parent, _eclassStore.get());

// Use the TreeModel's full string search function
_eclassView->AddSearchColumn(_eclassColumns.name);
Expand All @@ -139,7 +139,7 @@ void EClassTree::createPropertyTreeView(wxWindow* parent)
_propertyStore = new wxutil::TreeModel(_propertyColumns, true);

// Create the TreeView widget and link it to the model
_propertyView = wxutil::TreeView::CreateWithModel(parent, _propertyStore);
_propertyView = wxutil::TreeView::CreateWithModel(parent, _propertyStore.get());

// Create the Property column
_propertyView->AppendTextColumn(_("Property"), _propertyColumns.name.getColumnIndex(),
Expand Down
2 changes: 1 addition & 1 deletion radiant/ui/einspector/EntityInspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ wxWindow* EntityInspector::createTreeViewPane(wxWindow* parent)

_kvStore = new wxutil::TreeModel(_columns, true); // this is a list model

_keyValueTreeView = wxutil::TreeView::CreateWithModel(treeViewPanel, _kvStore, wxDV_MULTIPLE);
_keyValueTreeView = wxutil::TreeView::CreateWithModel(treeViewPanel, _kvStore.get(), wxDV_MULTIPLE);

// Search in both name and value columns
_keyValueTreeView->AddSearchColumn(_columns.name);
Expand Down
2 changes: 1 addition & 1 deletion radiant/ui/einspector/SkinChooser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void SkinChooser::populateWindow()
splitter->SetMinimumPaneSize(10); // disallow unsplitting

// Create the tree view
_treeView = wxutil::TreeView::CreateWithModel(splitter, _treeStore, wxDV_NO_HEADER);
_treeView = wxutil::TreeView::CreateWithModel(splitter, _treeStore.get(), wxDV_NO_HEADER);
_treeView->SetMinClientSize(wxSize(GetSize().GetWidth() / 5, -1));

// Single column to display the skin name
Expand Down
2 changes: 1 addition & 1 deletion radiant/ui/entitylist/EntityList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void EntityList::populateWindow()

// Configure the treeview
_treeView = wxutil::TreeView::CreateWithModel(
this, _treeModel.getModel(),
this, _treeModel.getModel().get(),
#if defined(__linux__)
wxDV_MULTIPLE
#else
Expand Down
2 changes: 1 addition & 1 deletion radiant/ui/filters/editor/FilterDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void FilterDialog::createFiltersPanel()
wxPanel* parent = findNamedObject<wxPanel>(this, "FilterDialogTreeViewPanel");

// Create a new treeview
_filterView = wxutil::TreeView::CreateWithModel(parent, _filterStore);
_filterView = wxutil::TreeView::CreateWithModel(parent, _filterStore.get());

_filterView->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED,
wxDataViewEventHandler(FilterDialog::onFilterSelectionChanged), NULL, this);
Expand Down
2 changes: 1 addition & 1 deletion radiant/ui/mapinfo/EntityInfoTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void EntityInfoTab::populateTab()
_listStore = new wxutil::TreeModel(_columns, true);

// Create the treeview and pack two columns into it
_treeView = wxutil::TreeView::CreateWithModel(this, _listStore);
_treeView = wxutil::TreeView::CreateWithModel(this, _listStore.get());

_treeView->AppendTextColumn(_("Entity Class"), _columns.eclass.getColumnIndex(),
wxDATAVIEW_CELL_INERT, wxCOL_WIDTH_AUTOSIZE, wxALIGN_NOT, wxDATAVIEW_COL_SORTABLE);
Expand Down
2 changes: 1 addition & 1 deletion radiant/ui/mapinfo/LayerInfoTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void LayerInfoTab::populateTab()
_listStore = new wxutil::TreeModel(_columns, true);

// Create the treeview and pack two columns into it
_treeView = wxutil::TreeView::CreateWithModel(this, _listStore);
_treeView = wxutil::TreeView::CreateWithModel(this, _listStore.get());

_treeView->AppendTextColumn(_("Layer"), _columns.layerName.getColumnIndex(),
wxDATAVIEW_CELL_INERT, wxCOL_WIDTH_AUTOSIZE, wxALIGN_NOT, wxDATAVIEW_COL_SORTABLE);
Expand Down
2 changes: 1 addition & 1 deletion radiant/ui/mapinfo/ModelInfoTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void ModelInfoTab::populateTab()
_listStore = new wxutil::TreeModel(_columns, true);

// Create the treeview and pack two columns into it
_treeView = wxutil::TreeView::CreateWithModel(this, _listStore);
_treeView = wxutil::TreeView::CreateWithModel(this, _listStore.get());

_treeView->AppendTextColumn(_("Model"), _columns.model.getColumnIndex(),
wxDATAVIEW_CELL_INERT, wxCOL_WIDTH_AUTOSIZE, wxALIGN_NOT, wxDATAVIEW_COL_SORTABLE);
Expand Down
2 changes: 1 addition & 1 deletion radiant/ui/mapinfo/ShaderInfoTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace
ShaderInfoTab::ShaderInfoTab(wxWindow* parent) :
wxPanel(parent, wxID_ANY),
_listStore(new wxutil::TreeModel(_columns, true)),
_treeView(wxutil::TreeView::CreateWithModel(this, _listStore)),
_treeView(wxutil::TreeView::CreateWithModel(this, _listStore.get())),
_popupMenu(new wxutil::PopupMenu)
{
// Create all the widgets
Expand Down
Loading

0 comments on commit e357a35

Please sign in to comment.