Skip to content

Commit aabcce4

Browse files
committed
Disable on Mac
1 parent cee054e commit aabcce4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Interface/Application/ModuleWidget.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ void ModuleWidget::postLoadAction()
543543

544544
void ModuleWidget::showReplaceWithWidget()
545545
{
546+
#ifndef __APPLE__
546547
replaceWithDialog_ = new QDialog;
547548
replaceWithDialog_->setWindowTitle("Replace a module");
548549
auto layout = new QHBoxLayout;
@@ -557,6 +558,9 @@ void ModuleWidget::showReplaceWithWidget()
557558
layout->addWidget(cancel);
558559
replaceWithDialog_->setLayout(layout);
559560
replaceWithDialog_->exec();
561+
#else
562+
QMessageBox::information(nullptr, "Replace with disabled", "The replace with command is disabled on OSX until the Qt 5 upgrade is complete.");
563+
#endif
560564
}
561565

562566
bool ModuleWidget::guiVisible() const
@@ -583,7 +587,8 @@ void ModuleWidget::fillReplaceWithMenu(QMenu* menu)
583587

584588
void ModuleWidget::replaceModuleWith()
585589
{
586-
delete replaceWithDialog_;
590+
replaceWithDialog_->deleteLater();
591+
replaceWithDialog_ = nullptr;
587592
auto action = qobject_cast<QAction*>(sender());
588593
auto moduleToReplace = action->text();
589594
Q_EMIT replaceModuleWith(theModule_, moduleToReplace.toStdString());

0 commit comments

Comments
 (0)