From ba4f9b599069b93d2c73e13b43493da5bfe9b40e Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 21 May 2009 17:34:41 -0400 Subject: Add method for getting the game for an index instead of only the current index --- sigmodr/tree/TreeWidget.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sigmodr/tree/TreeWidget.cpp') diff --git a/sigmodr/tree/TreeWidget.cpp b/sigmodr/tree/TreeWidget.cpp index fb7102dc..f1b46e5c 100644 --- a/sigmodr/tree/TreeWidget.cpp +++ b/sigmodr/tree/TreeWidget.cpp @@ -65,11 +65,6 @@ ObjectUI* TreeWidget::editorWidget(const QModelIndex& index) return widget; } -const Game* TreeWidget::currentGame() const -{ - return qobject_cast(model())->findGame(currentIndex()); -} - // QDomDocument TreeWidget::copy(const QModelIndex& index) // { // QDomDocument xml; @@ -82,6 +77,11 @@ const Game* TreeWidget::currentGame() const // model()->setData(index, data.toString(), BaseModel::XmlRole); // } // +const Game* TreeWidget::game(const QModelIndex& index) const +{ + return qobject_cast(model())->findGame(index); +} + QList TreeWidget::openedGames() const { return m_games.keys(); -- cgit