mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-18 13:12:50 +00:00
Fixed merge conflicts with saving branch
This commit is contained in:
parent
9ce4a04a2d
commit
ba365ff49e
@ -161,42 +161,8 @@ void Launcher::DataFilesPage::slotProfileDeleted (const QString &item)
|
||||
|
||||
void Launcher::DataFilesPage::slotProfileChangedByUser(const QString &previous, const QString ¤t)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
setProfile(previous, current, true);
|
||||
emit signalProfileChanged (ui.profilesComboBox->findText(current));
|
||||
=======
|
||||
if (mContentModel->rowCount() < 1)
|
||||
return;
|
||||
|
||||
QString profile = mLauncherSettings.value(QString("Profiles/currentprofile"));
|
||||
|
||||
if (profile.isEmpty()) {
|
||||
profile = profilesComboBox->currentText();
|
||||
mLauncherSettings.setValue(QString("Profiles/currentprofile"), profile);
|
||||
}
|
||||
|
||||
mLauncherSettings.remove(QString("Profiles/") + profile + QString("/master"));
|
||||
mLauncherSettings.remove(QString("Profiles/") + profile + QString("/plugin"));
|
||||
|
||||
mGameSettings.remove(QString("master"));
|
||||
mGameSettings.remove(QString("plugins"));
|
||||
mGameSettings.remove(QString("content"));
|
||||
|
||||
ContentSelectorModel::ContentFileList items = mContentModel->checkedItems();
|
||||
|
||||
foreach(const ContentSelectorModel::EsmFile *item, items) {
|
||||
|
||||
if (item->gameFiles().size() == 0) {
|
||||
mLauncherSettings.setMultiValue(QString("Profiles/") + profile + QString("/master"), item->fileName());
|
||||
mGameSettings.setMultiValue(QString("content"), item->fileName());
|
||||
|
||||
} else {
|
||||
mLauncherSettings.setMultiValue(QString("Profiles/") + profile + QString("/plugin"), item->fileName());
|
||||
mGameSettings.setMultiValue(QString("content"), item->fileName());
|
||||
}
|
||||
}
|
||||
|
||||
>>>>>>> 3146af34d642a28b15b55f7eb9999d8ac50168a0
|
||||
}
|
||||
|
||||
void Launcher::DataFilesPage::slotProfileRenamed(const QString &previous, const QString ¤t)
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "model/world/data.hpp"
|
||||
#include <iostream>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
CS::Editor::Editor()
|
||||
: mDocumentManager (mCfgMgr), mViewManager (mDocumentManager)
|
||||
@ -19,7 +20,6 @@ CS::Editor::Editor()
|
||||
setupDataFiles();
|
||||
|
||||
mNewGame.setLocalData (mLocal);
|
||||
mFileDialog.setLocalData (mLocal);
|
||||
|
||||
connect (&mViewManager, SIGNAL (newGameRequest ()), this, SLOT (createGame ()));
|
||||
connect (&mViewManager, SIGNAL (newAddonRequest ()), this, SLOT (createAddon ()));
|
||||
@ -32,8 +32,8 @@ CS::Editor::Editor()
|
||||
connect (&mStartup, SIGNAL (editConfig()), this, SLOT (showSettings ()));
|
||||
|
||||
connect (&mFileDialog, SIGNAL(openFiles()), this, SLOT(openFiles()));
|
||||
connect (&mFileDialog, SIGNAL(createNewFile (const boost::filesystem::path&)),
|
||||
this, SLOT(createNewFile (const boost::filesystem::path&)));
|
||||
connect (&mFileDialog, SIGNAL(createNewFile ()),
|
||||
this, SLOT(createNewFile ()));
|
||||
|
||||
connect (&mNewGame, SIGNAL (createRequest (const boost::filesystem::path&)),
|
||||
this, SLOT (createNewGame (const boost::filesystem::path&)));
|
||||
@ -141,7 +141,7 @@ void CS::Editor::openFiles()
|
||||
mFileDialog.hide();
|
||||
}
|
||||
|
||||
void CS::Editor::createNewFile (const boost::filesystem::path& savePath)
|
||||
void CS::Editor::createNewFile ()
|
||||
{
|
||||
std::vector<boost::filesystem::path> files;
|
||||
|
||||
|
@ -60,7 +60,7 @@ namespace CS
|
||||
|
||||
void loadDocument();
|
||||
void openFiles();
|
||||
void createNewFile (const boost::filesystem::path& savePath);
|
||||
void createNewFile ();
|
||||
void createNewGame (const boost::filesystem::path& file);
|
||||
|
||||
void showStartup();
|
||||
|
@ -2246,7 +2246,7 @@ CSMDoc::Document::Document (const Files::ConfigurationManager& configuration, co
|
||||
mData.setAuthor ("");
|
||||
}
|
||||
/// \todo un-outcomment the else, once loading an existing content file works properly again.
|
||||
// else
|
||||
else
|
||||
{
|
||||
if (boost::filesystem::exists (mProjectPath))
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ namespace CSMWorld
|
||||
else
|
||||
{
|
||||
record.mState = RecordBase::State_Deleted;
|
||||
setRecord (index, record);
|
||||
this->setRecord (index, record);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -17,8 +17,6 @@
|
||||
#include "filewidget.hpp"
|
||||
#include "adjusterwidget.hpp"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
CSVDoc::FileDialog::FileDialog(QWidget *parent) :
|
||||
QDialog(parent), mSelector (0)
|
||||
{
|
||||
@ -61,6 +59,13 @@ void CSVDoc::FileDialog::showDialog(DialogType dialogType)
|
||||
break;
|
||||
}
|
||||
|
||||
//connections common to both dialog view flavors
|
||||
connect (mSelector, SIGNAL (signalCurrentGamefileIndexChanged (int)),
|
||||
this, SLOT (slotUpdateAcceptButton (int)));
|
||||
|
||||
connect (ui.projectButtonBox, SIGNAL (accepted()), this, SIGNAL (createNewFile()));
|
||||
connect (ui.projectButtonBox, SIGNAL (rejected()), this, SLOT (slotRejected()));
|
||||
|
||||
show();
|
||||
raise();
|
||||
activateWindow();
|
||||
@ -82,13 +87,7 @@ void CSVDoc::FileDialog::buildNewFileView()
|
||||
ui.projectGroupBoxLayout->insertWidget (0, mFileWidget);
|
||||
|
||||
connect (mFileWidget, SIGNAL (nameChanged(const QString &, bool)),
|
||||
this, SLOT (slotUpdateCreateButton(const QString &, bool)));
|
||||
|
||||
connect (mSelector, SIGNAL (signalCurrentGamefileIndexChanged (int)),
|
||||
this, SLOT (slotUpdateCreateButton (int)));
|
||||
|
||||
connect (ui.projectButtonBox, SIGNAL (accepted()), this, SIGNAL (createNewFile()));
|
||||
connect (ui.projectButtonBox, SIGNAL (rejected()), this, SLOT (slotRejected()));
|
||||
this, SLOT (slotUpdateAcceptButton(const QString &, bool)));
|
||||
}
|
||||
|
||||
void CSVDoc::FileDialog::buildOpenFileView()
|
||||
@ -96,21 +95,25 @@ void CSVDoc::FileDialog::buildOpenFileView()
|
||||
setWindowTitle(tr("Open"));
|
||||
ui.projectGroupBox->setTitle (QString(""));
|
||||
|
||||
connect (ui.projectButtonBox, SIGNAL (accepted()), this, SIGNAL (openFiles()));
|
||||
connect (ui.projectButtonBox, SIGNAL (rejected()), this, SLOT (slotRejected()));
|
||||
ui.projectButtonBox->button(QDialogButtonBox::Ok)->setEnabled (false);
|
||||
}
|
||||
|
||||
void CSVDoc::FileDialog::slotUpdateCreateButton (int)
|
||||
void CSVDoc::FileDialog::slotUpdateAcceptButton (int)
|
||||
{
|
||||
slotUpdateCreateButton (mFileWidget->getName(), true);
|
||||
QString name = "";
|
||||
|
||||
if (mDialogType == DialogType_New)
|
||||
name = mFileWidget->getName();
|
||||
|
||||
slotUpdateAcceptButton (name, true);
|
||||
}
|
||||
|
||||
void CSVDoc::FileDialog::slotUpdateCreateButton(const QString &name, bool)
|
||||
void CSVDoc::FileDialog::slotUpdateAcceptButton(const QString &name, bool)
|
||||
{
|
||||
if (!(mDialogType == DialogType_New))
|
||||
return;
|
||||
bool success = (mSelector->selectedFiles().size() > 0);
|
||||
|
||||
bool success = (!name.isEmpty() && mSelector->selectedFiles().size() > 0);
|
||||
if (mDialogType == DialogType_New)
|
||||
success = success && !(name.isEmpty());
|
||||
|
||||
ui.projectButtonBox->button (QDialogButtonBox::Ok)->setEnabled (success);
|
||||
}
|
||||
@ -128,8 +131,3 @@ void CSVDoc::FileDialog::slotRejected()
|
||||
emit rejected();
|
||||
close();
|
||||
}
|
||||
|
||||
void CSVDoc::FileDialog::createNewFile()
|
||||
{
|
||||
emit createNewFile (mAdjusterWidget->getPath());
|
||||
}
|
||||
|
@ -55,15 +55,14 @@ namespace CSVDoc
|
||||
signals:
|
||||
|
||||
void openFiles();
|
||||
void createNewFile (const boost::filesystem::path& savePath);
|
||||
void createNewFile ();
|
||||
|
||||
void signalUpdateCreateButton (bool, int);
|
||||
void signalUpdateCreateButtonFlags(int);
|
||||
void signalUpdateAcceptButton (bool, int);
|
||||
|
||||
private slots:
|
||||
|
||||
void slotUpdateCreateButton (int);
|
||||
void slotUpdateCreateButton (const QString &, bool);
|
||||
void slotUpdateAcceptButton (int);
|
||||
void slotUpdateAcceptButton (const QString &, bool);
|
||||
void slotRejected();
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user