Commit c52235722bb7d3e85d76186a284df0324c68c2eb

  • Tree SHA1: 2858d55
  • Parent SHA1: 8676742 (Added a manual reload option for tileset images, with context menu action and F5-key hook (works when tileset view is focused). Added a context menu to the tab bar, which is partially written. More work is needed, however. It does not yet have actions for removing/renaming tilesets, and it does not remember where to start the file dialog for import browsing (shoddy code duplication from mainwindow.cpp for now -- needs reworking).)
  • raw diff | raw patch
Updated tileset tab context menu to add an option to removetilesets (even though there is a close button, it should appear under the tab context menu too)
  
307307 if (index == -1) {
308308 menu.exec(mTabBar->mapToGlobal(point));
309309 } else {
310 menu.addSeparator();
311310 mTabBar->setCurrentIndex(index);
311
312 menu.addSeparator();
313
314 QAction *actionRemoveTileset = menu.addAction(tr("Remove Tileset"));
315 connect(actionRemoveTileset, SIGNAL(triggered()), this, SLOT(removeActiveTileset()));
316 menu.addSeparator();
317
312318 tilesetViewAt(index)->contextMenu(menu, mTabBar->mapToGlobal(point), true);
313319 }
314320}
358358 }
359359}
360360
361void TilesetDock::removeActiveTileset()
362{
363 removeTileset(mTabBar->currentIndex());
364}
361365
362366void TilesetDock::setCurrentTiles(TileLayer *tiles)
363367{
  
8080 void tabContext(const QPoint &point);
8181 void newTileset();
8282 void addExternalTileset();
83 void removeActiveTileset();
8384private:
8485 void setCurrentTiles(TileLayer *tiles);
8586 void retranslateUi();