fixed missing adjuster widget in file dialog open view

This commit is contained in:
graffy76 2013-10-27 20:21:19 -05:00
parent ea7a8eb2a4
commit b51bef0d98
6 changed files with 53 additions and 23 deletions

View file

@ -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;