Topic: Double campaign description

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

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 UTC+1.0
Posts: 2171
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-05-02, 10:09 UTC+2.0

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 UTC+2.0
Posts: 16
Ranking
Pry about Widelands
Location: Germany
Posted at: 2020-05-02, 10:28 UTC+2.0

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 UTC+1.0
Posts: 2683
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-05-02, 10:50 UTC+2.0

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

double

Edited: 2020-05-02, 10:51 UTC+2.0

Attachment: image/jpeg
double_description.jpg

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

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 UTC+1.0
Posts: 2171
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-05-02, 11:18 UTC+2.0

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 UTC+1.0
Posts: 2171
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-05-02, 11:34 UTC+2.0

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


Top Quote