X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fstandardfeedsview.cpp;h=0f0356493d88a3f8cb5dc14046c08cc8aaa0ca1c;hb=refs%2Ftags%2Fupstream%2F2.4;hp=7942d0d77dce2e9084c3d922962a873e292fd9fe;hpb=4250cf62c1410d5c4e16720128264aeb59c8dc17;p=minitube diff --git a/src/standardfeedsview.cpp b/src/standardfeedsview.cpp index 7942d0d..0f03564 100644 --- a/src/standardfeedsview.cpp +++ b/src/standardfeedsview.cpp @@ -50,6 +50,7 @@ StandardFeedsView::StandardFeedsView(QWidget *parent) : QWidget(parent), } void StandardFeedsView::load() { + setUpdatesEnabled(false); YTCategories *youTubeCategories = new YTCategories(this); connect(youTubeCategories, SIGNAL(categoriesLoaded(const QList &)), SLOT(layoutCategories(const QList &))); @@ -88,6 +89,7 @@ void StandardFeedsView::layoutCategories(const QList &categories) { feed->setFeedId("most_popular"); addVideoSourceWidget(feed); } + if (categories.size() > 1) setUpdatesEnabled(true); } void StandardFeedsView::addVideoSourceWidget(VideoSource *videoSource) { @@ -124,7 +126,11 @@ YTStandardFeed* StandardFeedsView::buildStardardFeed( void StandardFeedsView::appear() { setFocus(); - if (!layout) load(); + if (!layout) { + update(); + qApp->processEvents(); + load(); + } QAction *regionAction = MainWindow::instance()->getRegionAction(); regionAction->setVisible(true); } @@ -146,6 +152,6 @@ void StandardFeedsView::selectLocalRegion() { void StandardFeedsView::paintEvent(QPaintEvent *event) { QWidget::paintEvent(event); - PainterUtils::topShadow(this); + // PainterUtils::topShadow(this); }