Commit a21aa96a authored by Aron Helser's avatar Aron Helser Committed by Kitware Robot

Merge topic 'pallet_dialog_fix'

ffc8ac72 AssignColorsView: fix pqPalletChooser behavior on apply.
Acked-by: Kitware Robot's avatarKitware Robot <>
Acked-by: David Thompson's avatarDavid Thompson <>
Merge-request: !1750
parents ebd7c796 ffc8ac72
Pipeline #153889 failed with stage
......@@ -4,3 +4,4 @@
- Added `knee.ex2` exodus test data, used by ModelBuilder tests for now.
- If we are running tests, don't display the "Your data is modified, save changes?" dialog on exit.
- Plugin (contract) tests now have a timeout of 600 seconds to allow more time for cloning and building a repository.
- fix the smtkAssignColorsView pallet choose dialog handling so it is testable with xml tests.
......@@ -177,6 +177,7 @@ pqSMTKCloseResourceBehavior::pqSMTKCloseResourceBehavior(QObject* parent)
QAction* closeResourceAction =
new QAction(QPixmap(":/CloseResourceBehavior/Close22.png"), tr("&Close Resource"), this);
closeResourceAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_W));
QMainWindow* mainWindow = qobject_cast<QMainWindow*>(pqCoreUtilities::mainWidget());
......@@ -253,8 +253,6 @@ void smtkAssignColorsView::prepPaletteChooser()
QObject::connect( // When the user has chosen a preference, remember and apply it.
this->Internals->PaletteChooser, SIGNAL(applyPreset(const Json::Value&)), this,
QObject::connect( // When the user has cancel the dialog.
this->Internals->PaletteChooser, SIGNAL(rejected()), this, SLOT(resetPaletteChooser()));
void smtkAssignColorsView::createWidget()
......@@ -441,12 +439,6 @@ void smtkAssignColorsView::applyDefaultColor()
void smtkAssignColorsView::resetPaletteChooser()
delete this->Internals->PaletteChooser;
void smtkAssignColorsView::setDefaultPaletteAndApply()
const Json::Value& preset = this->Internals->PaletteChooser->currentPreset();
......@@ -455,12 +447,12 @@ void smtkAssignColorsView::setDefaultPaletteAndApply()
pqSettings* settings = pqApplicationCore::instance()->settings();
settings->setValue("ModelBuilder/Operations/AssignColors/defaultPalette", name.c_str());
// There is a strange bug that seems to make QT treat the PaletteChooser as a modal
// dialog - the UI does not seem to respond after you set the default palette.
// One solution that seems to work is to destroy and recreate the dialog
// pqPresetDialog has a custom event filter in ParaView, disabling everything except
// the render window when opened.
// If we don't 'close', the UI does not seem to respond after you set the default palette.
// The close slot cleans up the custom event filter which blocks UI events.
// Also makes the dialog testable with recorded xml tests.
......@@ -58,7 +58,6 @@ protected slots:
virtual void processOpacityValue(double);
virtual void removeColors();
virtual void setDefaultPaletteAndApply();
virtual void resetPaletteChooser();
// This slot is used to indicate that the underlying attribute
// for the operation should be checked for validity
virtual void attributeModified();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment