Browse Source

fixes to mapeditor

Opuszek 3 weeks ago
parent
commit
b1186f6fe3
3 changed files with 3 additions and 3 deletions
  1. 1 1
      mapeditor/inspector/rewardswidget.cpp
  2. 1 1
      mapeditor/mainwindow.cpp
  3. 1 1
      mapeditor/scenelayer.cpp

+ 1 - 1
mapeditor/inspector/rewardswidget.cpp

@@ -459,7 +459,7 @@ void RewardsWidget::loadCurrentVisitInfo(int index)
 	for(auto i : vinfo.reward.grantedArtifacts)
 		ui->rArtifacts->item(LIBRARY->artifacts()->getById(i)->getIndex())->setCheckState(Qt::Checked);
 	for(auto i : vinfo.reward.spells)
-		ui->rArtifacts->item(LIBRARY->spells()->getById(i)->getIndex())->setCheckState(Qt::Checked);
+		ui->rSpells->item(LIBRARY->spells()->getById(i)->getIndex())->setCheckState(Qt::Checked);
 	for(auto & i : vinfo.reward.secondary)
 	{
 		int index = LIBRARY->skills()->getById(i.first)->getIndex();

+ 1 - 1
mapeditor/mainwindow.cpp

@@ -457,7 +457,7 @@ void MainWindow::initializeMap(bool isNew)
 		controller.map()->players[0].canComputerPlay = true;
 		controller.map()->players[0].canHumanPlay = true;
 	}
-	
+	ui->inspectorWidget->setRowCount(0);
 	onPlayersChanged();
 }
 

+ 1 - 1
mapeditor/scenelayer.cpp

@@ -327,7 +327,7 @@ QGraphicsItem * PassabilityLayer::draw(const QRectF & section)
 	if(isShown)
 	{
 		QPainter painter(&pixmap);
-		for(int j = 0; j <= pixmap.height(); j += tileSize)
+		for(int j = 0; j < pixmap.height(); j += tileSize)
 		{
 			for(int i = 0; i < pixmap.width(); i += tileSize)
 			{