Remember background type in Tools->Save picture dialog
This commit is contained in:
@@ -1732,6 +1732,7 @@ void StdViewScreenShot::activated(int iMsg)
|
||||
Base::Reference<ParameterGrp> hExt = App::GetApplication().GetUserParameter().GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")->GetGroup("General");
|
||||
QString ext = QString::fromLatin1(hExt->GetASCII("OffscreenImageFormat").c_str());
|
||||
int backtype = hExt->GetInt("OffscreenImageBackground",0);
|
||||
|
||||
QStringList filter;
|
||||
QString selFilter;
|
||||
@@ -1754,6 +1755,7 @@ void StdViewScreenShot::activated(int iMsg)
|
||||
DlgSettingsImageImp* opt = new DlgSettingsImageImp(&fd);
|
||||
SbVec2s sz = vp.getWindowSize();
|
||||
opt->setImageSize((int)sz[0], (int)sz[1]);
|
||||
opt->setBackgroundType(backtype);
|
||||
|
||||
fd.setOptionsWidget(FileOptionsDialog::ExtensionRight, opt);
|
||||
fd.setConfirmOverwrite(true);
|
||||
@@ -1794,6 +1796,7 @@ void StdViewScreenShot::activated(int iMsg)
|
||||
case 3: background="Transparent"; break;
|
||||
default: background="Current"; break;
|
||||
}
|
||||
hExt->SetInt("OffscreenImageBackground",opt->backgroundType());
|
||||
|
||||
QString comment = opt->comment();
|
||||
if (!comment.isEmpty()) {
|
||||
|
||||
@@ -139,6 +139,15 @@ int DlgSettingsImageImp::backgroundType() const
|
||||
return comboBackground->currentIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the image size to (\a w, \a h).
|
||||
*/
|
||||
void DlgSettingsImageImp::setBackgroundType(int t)
|
||||
{
|
||||
if ( t < comboBackground->count() )
|
||||
comboBackground->setCurrentIndex(t);
|
||||
}
|
||||
|
||||
bool DlgSettingsImageImp::addWatermark() const
|
||||
{
|
||||
return checkWatermark->isChecked();
|
||||
|
||||
@@ -57,6 +57,7 @@ public:
|
||||
//@{
|
||||
QString comment() const;
|
||||
int backgroundType() const;
|
||||
void setBackgroundType( int );
|
||||
bool addWatermark() const;
|
||||
//@}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user