GH-994 hopefully fix issue with people still using jar mods
Added an 'add mods' button to the version page Add jar mods now has a very angry nag dialog until it's used successfully Buttons on version page are rearranged to deemphasize jar mods
This commit is contained in:
@ -68,6 +68,7 @@ PageContainer::PageContainer(BasePageProviderPtr pageProvider, QString defaultId
|
||||
{
|
||||
page->stackIndex = m_pageStack->addWidget(dynamic_cast<QWidget *>(page));
|
||||
page->listIndex = counter;
|
||||
page->setParentContainer(this);
|
||||
counter++;
|
||||
if (firstIndex == -1)
|
||||
{
|
||||
@ -87,8 +88,13 @@ PageContainer::PageContainer(BasePageProviderPtr pageProvider, QString defaultId
|
||||
this, SLOT(currentChanged(QModelIndex)));
|
||||
m_pageStack->setStackingMode(QStackedLayout::StackOne);
|
||||
m_pageList->setFocus();
|
||||
selectPage(defaultId);
|
||||
}
|
||||
|
||||
bool PageContainer::selectPage(QString pageId)
|
||||
{
|
||||
// now find what we want to have selected...
|
||||
auto page = m_model->findPageEntryById(defaultId);
|
||||
auto page = m_model->findPageEntryById(pageId);
|
||||
QModelIndex index;
|
||||
if (page)
|
||||
{
|
||||
@ -99,7 +105,11 @@ PageContainer::PageContainer(BasePageProviderPtr pageProvider, QString defaultId
|
||||
index = m_proxyModel->index(0, 0);
|
||||
}
|
||||
if (index.isValid())
|
||||
{
|
||||
m_pageList->setCurrentIndex(index);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void PageContainer::createUI()
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <QModelIndex>
|
||||
|
||||
#include "pages/BasePageProvider.h"
|
||||
#include "pages/BasePageContainer.h"
|
||||
|
||||
class QLayout;
|
||||
class IconLabel;
|
||||
@ -30,7 +31,7 @@ class QLineEdit;
|
||||
class QStackedLayout;
|
||||
class QGridLayout;
|
||||
|
||||
class PageContainer : public QWidget
|
||||
class PageContainer : public QWidget, public BasePageContainer
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -42,6 +43,8 @@ public:
|
||||
void addButtons(QLayout * buttons);
|
||||
bool requestClose(QCloseEvent *event);
|
||||
|
||||
virtual bool selectPage(QString pageId) override;
|
||||
|
||||
private:
|
||||
void createUI();
|
||||
private
|
||||
|
Reference in New Issue
Block a user