Currently Online

Latest Posts

Topic: Double campaign description

minero
Avatar
Topic Opener
Joined: 2020-05-01, 11:36
Posts: 16
Ranking
Pry about Widelands
Location: Germany
Posted at: 2020-05-02, 09:09

Hi,

yesterday I got the development version (r24581) of widelands from github. In this version gives a double description in the campaign menu.

Is this a bug?

I solved for me with:

diff --git a/src/ui_fsmenu/campaigndetails.cc b/src/ui_fsmenu/campaigndetails.cc
index f33f0a42ae..119a4a82c4 100644
--- a/src/ui_fsmenu/campaigndetails.cc
+++ b/src/ui_fsmenu/campaigndetails.cc
@@ -72,9 +72,6 @@ void CampaignDetails::update(const CampaignData& campaigndata) {
                               as_content(campaigndata.description, UI::PanelStyle::kFsMenu))
                                 .str();
        }
-       description = (boost::format("%s%s") % description %
-                      as_content(campaigndata.description, UI::PanelStyle::kFsMenu))
-                        .str();

        description = (boost::format("<rt>%s</rt>") % description).str();
        descr_.set_text(description);

At the moment I'm not familiar with the workflow of bugreport + code suggestions in github. Sorry, so I post it here.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-05-02, 10:09

Not sure what you mean here, the campaign description looks fine for me in current master. Could you attach a screenshot?


Top Quote
minero
Avatar
Topic Opener
Joined: 2020-05-01, 11:36
Posts: 16
Ranking
Pry about Widelands
Location: Germany
Posted at: 2020-05-02, 10:28

Hhhmmm. After I switch back to master branch and compile again, the description looks fine. But after git clone and first compile the campaign description was double. I try to reproduce it and make a screenshot.


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-05-02, 10:50

I can confirm this with version r24581[a2fa732@master] (Debug):

double

Edited: 2020-05-02, 10:51

Attachment:
double_description.jpg

Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
minero
Avatar
Topic Opener
Joined: 2020-05-01, 11:36
Posts: 16
Ranking
Pry about Widelands
Location: Germany
Posted at: 2020-05-02, 11:11

Yes this I mean. Now I have also a screenshot, but kaputtnik was quicker. face-smile.png


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-05-02, 11:18

Ah right. I'll make a branch to fix this with the patch above, well spotted face-smile.png


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-05-02, 11:34

https://github.com/widelands/widelands/pull/3892


Top Quote