Browse Source

minors:
- fixes missing line of pixels with Chinese fonts
- disabling a mod won't disable all its requirements as well

Ivan Savenko 12 years ago
parent
commit
6331995afd

+ 1 - 1
client/gui/CIntObjectClasses.cpp

@@ -1284,7 +1284,7 @@ void CTextContainer::blitLine(SDL_Surface *to, Rect destRect, std::string what)
 				f->renderTextLeft(to, toPrint, color, where);
 				f->renderTextLeft(to, toPrint, color, where);
 			begin = end;
 			begin = end;
 
 
-			destRect.x += f->getStringWidth(toPrint);
+			where.x += f->getStringWidth(toPrint);
 		}
 		}
 		currDelimeter++;
 		currDelimeter++;
 	}
 	}

+ 2 - 2
client/gui/Fonts.cpp

@@ -313,11 +313,11 @@ void CBitmapHanFont::renderCharacter(SDL_Surface * surface, int characterIndex,
 
 
 	// start of line, may differ from 0 due to end of surface or clipped surface
 	// start of line, may differ from 0 due to end of surface or clipped surface
 	int lineBegin = std::max<int>(0, clipRect.y - posY);
 	int lineBegin = std::max<int>(0, clipRect.y - posY);
-	int lineEnd   = std::min<int>(size, clipRect.y + clipRect.h - posY - 1);
+	int lineEnd   = std::min<int>(size, clipRect.y + clipRect.h - posY);
 
 
 	// start end end of each row, may differ from 0
 	// start end end of each row, may differ from 0
 	int rowBegin = std::max<int>(0, clipRect.x - posX);
 	int rowBegin = std::max<int>(0, clipRect.x - posX);
-	int rowEnd   = std::min<int>(size, clipRect.x + clipRect.w - posX - 1);
+	int rowEnd   = std::min<int>(size, clipRect.x + clipRect.w - posX);
 
 
 	//for each line in symbol
 	//for each line in symbol
 	for(int dy = lineBegin; dy <lineEnd; dy++)
 	for(int dy = lineBegin; dy <lineEnd; dy++)

+ 4 - 4
launcher/modManager/cmodlistview_moc.cpp

@@ -351,10 +351,10 @@ void CModListView::on_disableButton_clicked()
 {
 {
 	QString modName = modModel->modIndexToName(filterModel->mapToSource(ui->allModsView->currentIndex()).row());
 	QString modName = modModel->modIndexToName(filterModel->mapToSource(ui->allModsView->currentIndex()).row());
 
 
-	for (auto & name : modModel->getRequirements(modName))
-		if (modModel->hasMod(name) &&
-		    modModel->getMod(name).isEnabled())
-			manager->disableMod(name);
+	if (modModel->hasMod(modName) &&
+	    modModel->getMod(modName).isEnabled())
+			manager->disableMod(modName);
+
 	checkManagerErrors();
 	checkManagerErrors();
 }
 }