Skip to content

Commit c93c6b0

Browse files
committed
WelcomTab: Fixing a problem where main header text gets hidden at first launch
1 parent 36dbc07 commit c93c6b0

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
77
# Project version
88
set(PROJECT_VERSION_MAJOR "1")
99
set(PROJECT_VERSION_MINOR "1")
10-
set(PROJECT_VERSION_PATCH "0")
10+
set(PROJECT_VERSION_PATCH "1")
1111
set(PROJECT_VERSION_BUILD "")
1212
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${PROJECT_VERSION_BUILD}")
1313

src/robomongo/gui/widgets/workarea/WelcomeTab.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,10 @@ namespace Robomongo
266266
void WelcomeTab::on_downloadTextReply(QNetworkReply* reply)
267267
{
268268
auto hideOrShowWhatsNewHeader = [this]() {
269-
_whatsNewHeader->setHidden( (!_pic1->pixmap() || _pic1->pixmap()->isNull())
270-
&& _whatsNewText->text().isEmpty() ? true : false);
269+
if ((!_pic1->pixmap() || _pic1->pixmap()->isNull()) && _whatsNewText->text().isEmpty())
270+
_whatsNewHeader->setHidden(true);
271+
else
272+
_whatsNewHeader->setVisible(true);
271273
};
272274

273275
if (reply->operation() == QNetworkAccessManager::HeadOperation) {
@@ -315,6 +317,7 @@ namespace Robomongo
315317
}
316318

317319
setWhatsNewHeaderAndText(str);
320+
hideOrShowWhatsNewHeader();
318321
saveIntoCache(Text1_URL.fileName(), str, Text1_LastModifiedDateKey,
319322
reply->header(QNetworkRequest::LastModifiedHeader).toString());
320323
}
@@ -326,8 +329,10 @@ namespace Robomongo
326329

327330
QPixmap image;
328331
auto hideOrShowWhatsNewHeader = [this]() {
329-
_whatsNewHeader->setHidden( (!_pic1->pixmap() || _pic1->pixmap()->isNull())
330-
&& _whatsNewText->text().isEmpty() ? true : false);
332+
if ((!_pic1->pixmap() || _pic1->pixmap()->isNull()) && _whatsNewText->text().isEmpty())
333+
_whatsNewHeader->setHidden(true);
334+
else
335+
_whatsNewHeader->setVisible(true);
331336
};
332337

333338
// Network error, load from cache
@@ -359,7 +364,6 @@ namespace Robomongo
359364
}
360365
else { // Get from internet
361366
reply->manager()->get(QNetworkRequest(Pic1_URL));
362-
hideOrShowWhatsNewHeader();
363367
return;
364368
}
365369
}

0 commit comments

Comments
 (0)