mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-08 03:28:15 +03:00
fixed missing adjuster widget in file dialog open view
This commit is contained in:
parent
ea7a8eb2a4
commit
b51bef0d98
6 changed files with 53 additions and 23 deletions
|
@ -11,7 +11,7 @@
|
|||
#include <QStyle>
|
||||
|
||||
CSVDoc::AdjusterWidget::AdjusterWidget (QWidget *parent)
|
||||
: QWidget (parent), mValid (false)
|
||||
: QWidget (parent), mValid (false), mAction (ContentAction_Undefined)
|
||||
{
|
||||
QHBoxLayout *layout = new QHBoxLayout (this);
|
||||
|
||||
|
@ -30,6 +30,11 @@ CSVDoc::AdjusterWidget::AdjusterWidget (QWidget *parent)
|
|||
setLayout (layout);
|
||||
}
|
||||
|
||||
void CSVDoc::AdjusterWidget::setAction (ContentAction action)
|
||||
{
|
||||
mAction = action;
|
||||
}
|
||||
|
||||
void CSVDoc::AdjusterWidget::setLocalData (const boost::filesystem::path& localData)
|
||||
{
|
||||
mLocalData = localData;
|
||||
|
@ -51,6 +56,12 @@ void CSVDoc::AdjusterWidget::setName (const QString& name, bool addon)
|
|||
{
|
||||
QString message;
|
||||
|
||||
if (mAction == ContentAction_Undefined)
|
||||
{
|
||||
throw std::runtime_error("ContentAction_Undefined when AdjusterWidget::setName() called.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (name.isEmpty())
|
||||
{
|
||||
mValid = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue