Skip to content

Commit 79d77dd

Browse files
committed
Closes #770. GUI much more responsive now, networks load faster
1 parent 47c2ab3 commit 79d77dd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Interface/Application/ModuleWidget.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,8 @@ ModuleWidget::ModuleWidget(NetworkEditor* ed, const QString& name, SCIRun::Dataf
489489
resize(currentWidget()->size());
490490

491491
connect(this, SIGNAL(backgroundColorUpdated(const QString&)), this, SLOT(updateBackgroundColor(const QString&)));
492-
theModule_->connectExecutionStateChanged([this](int state) { QtConcurrent::run(boost::bind(&ModuleWidget::moduleStateUpdated, this, state)); });
493-
connect(this, SIGNAL(moduleStateUpdated(int)), this, SLOT(updateBackgroundColorForModuleState(int)));
492+
theModule_->connectExecutionStateChanged([this](int state) { QtConcurrent::run(boost::bind(&ModuleWidget::updateBackgroundColorForModuleState, this, state)); });
493+
//connect(this, SIGNAL(moduleStateUpdated(int)), this, SLOT(updateBackgroundColorForModuleState(int)));
494494

495495
Core::Preferences::Instance().modulesAreDockable.connectValueChanged(boost::bind(&ModuleWidget::adjustDockState, this, _1));
496496

@@ -611,12 +611,15 @@ void ModuleWidget::setupModuleActions()
611611
actionsMenu_.reset(new ModuleActionsMenu(this, moduleId_));
612612
addWidgetToExecutionDisableList(actionsMenu_->getAction("Execute"));
613613

614+
//TODO: very slow code, action disabled anyway--turning off for now
615+
#if 0
614616
auto replaceWith = actionsMenu_->getAction("Replace With");
615617
auto menu = new QMenu(this);
616618
replaceWith->setMenu(menu);
617619
fillReplaceWithMenu();
618620
connect(this, SIGNAL(connectionAdded(const SCIRun::Dataflow::Networks::ConnectionDescription&)), this, SLOT(fillReplaceWithMenu()));
619621
connect(this, SIGNAL(connectionDeleted(const SCIRun::Dataflow::Networks::ConnectionId&)), this, SLOT(fillReplaceWithMenu()));
622+
#endif
620623

621624
connect(actionsMenu_->getAction("Execute"), SIGNAL(triggered()), this, SLOT(executeButtonPushed()));
622625
connect(this, SIGNAL(updateProgressBarSignal(double)), this, SLOT(updateProgressBar(double)));

src/Interface/Application/Port.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ namespace SCIRun {
6565
[=](QAction* action) { QObject::connect(action, SIGNAL(triggered()), parent, SLOT(connectNewModule())); });
6666
}
6767

68+
//TODO: lots of duplicated filtering here. Make smarter logic to cache based on port type, since it's the same menu for each type--just need to copy an existing one.
6869
void fillMenuWithFilteredModuleActions(QMenu* menu, const ModuleDescriptionMap& moduleMap, ModulePredicate modulePred, QActionHookup hookup)
6970
{
7071
BOOST_FOREACH(const ModuleDescriptionMap::value_type& package, moduleMap)

0 commit comments

Comments
 (0)