From d31dfdb6e4c21199dcd12b8e4454205b42ce716d Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 26 Jul 2014 00:32:42 +0200 Subject: [PATCH] I must be blind... --HG-- branch : gsoc2014-dfighter --- .../src/plugins/tile_editor/tile_editor_main_window.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp b/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp index 1ad0e8a45..a0397fbda 100644 --- a/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp +++ b/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp @@ -554,8 +554,7 @@ void TileEditorMainWindow::onActionAddTile(int tabId) TileSetNode *tsn = reinterpret_cast< TileSetNode* >( idx.internalPointer() ); - int tabIdx = m_ui->tileViewTabWidget->currentIndex(); - Node *n = tsn->child( tabIdx ); + Node *n = tsn->child( tabId ); QFileDialog::Options options; QString selectedFilter; @@ -571,11 +570,11 @@ void TileEditorMainWindow::onActionAddTile(int tabId) c++; } - QModelIndex rootIdx = model->index( tabIdx, 0, m_ui->tileSetLV->currentIndex()); + QModelIndex rootIdx = model->index( tabId, 0, m_ui->tileSetLV->currentIndex()); QListView *lv = NULL; - switch( tabIdx ) + switch( tabId ) { case TAB_128: lv = m_ui->listView128; break; case TAB_256: lv = m_ui->listView256; break;