Răsfoiți Sursa

Merge pull request #2324 from mikeiit/develop

Fixed selection update in saving screen
Ivan Savenko 2 ani în urmă
părinte
comite
c2845d120b
2 a modificat fișierele cu 6 adăugiri și 3 ștergeri
  1. 4 3
      client/lobby/CSavingScreen.cpp
  2. 2 0
      client/lobby/SelectionTab.cpp

+ 4 - 3
client/lobby/CSavingScreen.cpp

@@ -36,10 +36,10 @@ CSavingScreen::CSavingScreen()
 	localMi->mapHeader = std::unique_ptr<CMapHeader>(new CMapHeader(*LOCPLINT->cb->getMapHeader()));
 
 	tabSel = std::make_shared<SelectionTab>(screenType);
-	curTab = tabSel;
-	tabSel->toggleMode();
-
 	tabSel->callOnSelect = std::bind(&CSavingScreen::changeSelection, this, _1);
+	tabSel->toggleMode();
+	curTab = tabSel;
+		
 	buttonStart = std::make_shared<CButton>(Point(411, 535), "SCNRSAV.DEF", CGI->generaltexth->zelp[103], std::bind(&CSavingScreen::saveGame, this), EShortcut::LOBBY_SAVE_GAME);
 }
 
@@ -62,6 +62,7 @@ void CSavingScreen::changeSelection(std::shared_ptr<CMapInfo> to)
 
 	localMi = to;
 	card->changeSelection();
+	card->redraw();
 }
 
 void CSavingScreen::saveGame()

+ 2 - 0
client/lobby/SelectionTab.cpp

@@ -419,7 +419,9 @@ void SelectionTab::select(int position)
 		auto filename = *CResourceHandler::get("local")->getResourceName(ResourceID(curItems[py]->fileURI, EResType::CLIENT_SAVEGAME));
 		inputName->setText(filename.stem().string());
 	}
+
 	updateListItems();
+	redraw();
 	if(callOnSelect)
 		callOnSelect(curItems[py]);
 }