Skip to content

Commit 05a6dd7

Browse files
committed
Temporary fix for Mac/Qt crash
1 parent c70fbf2 commit 05a6dd7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/Interface/Application/MainWindowCollaborators.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
using namespace SCIRun::Gui;
3535
using namespace SCIRun::Core::Logging;
3636

37-
void TextEditAppender::log(const QString& message) const
37+
void TextEditAppender::log(const QString& message) const
3838
{
3939
text_->append(message);
4040
}
@@ -90,7 +90,11 @@ namespace
9090
template <typename T>
9191
void operator()( T* widget ) const
9292
{
93-
widget->setDisabled(flag_);
93+
//TODO: investigate this Mac Qt bug in more detail. A better workaround probably exists. (Or just wait until Qt 5)
94+
#ifndef MACOS
95+
if (widget)
96+
widget->setDisabled(flag_);
97+
#endif
9498
}
9599
bool flag_;
96100
};
@@ -101,7 +105,7 @@ namespace
101105
}
102106
}
103107

104-
void WidgetDisablingService::addNetworkEditor(NetworkEditor* ne)
108+
void WidgetDisablingService::addNetworkEditor(NetworkEditor* ne)
105109
{
106110
ne_ = ne;
107111
}
@@ -121,4 +125,4 @@ void WidgetDisablingService::enableInputWidgets()
121125
{
122126
ne_->enableInputWidgets();
123127
setWidgetsDisableFlag(inputWidgets_, false);
124-
}
128+
}

0 commit comments

Comments
 (0)