Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix precedence errors #3611

Merged
merged 4 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/slic3r/GUI/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1258,11 +1258,11 @@ bool MachineObject::is_axis_at_home(std::string axis)
return true;

if (axis == "X") {
return home_flag & 1 == 1;
return (home_flag & 1) == 1;
} else if (axis == "Y") {
return home_flag >> 1 & 1 == 1;
return (home_flag >> 1 & 1) == 1;
} else if (axis == "Z") {
return home_flag >> 2 & 1 == 1;
return (home_flag >> 2 & 1) == 1;
} else {
return true;
}
Expand Down
6 changes: 3 additions & 3 deletions src/slic3r/GUI/Monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,14 @@ void MonitorPanel::show_status(int status)
{
if (!m_initialized) return;
if (last_status == status)return;
if (last_status & (int)MonitorStatus::MONITOR_CONNECTING != 0) {
if ((last_status & (int)MonitorStatus::MONITOR_CONNECTING) != 0) {
NetworkAgent* agent = wxGetApp().getAgent();
json j;
j["dev_id"] = obj ? obj->dev_id : "obj_nullptr";
if (status & (int)MonitorStatus::MONITOR_DISCONNECTED != 0) {
if ((status & (int)MonitorStatus::MONITOR_DISCONNECTED) != 0) {
j["result"] = "failed";
}
else if (status & (int)MonitorStatus::MONITOR_NORMAL != 0) {
else if ((status & (int)MonitorStatus::MONITOR_NORMAL) != 0) {
j["result"] = "success";
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6264,7 +6264,7 @@ void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
for (auto const& warning : state.warnings) {
if (warning.current) {
NotificationManager::NotificationLevel notif_level = NotificationManager::NotificationLevel::WarningNotificationLevel;
if (evt.status.message_type == PrintStateBase::SlicingNotificationType::SlicingReplaceInitEmptyLayers | PrintStateBase::SlicingNotificationType::SlicingEmptyGcodeLayers) {
if (evt.status.message_type == PrintStateBase::SlicingNotificationType::SlicingReplaceInitEmptyLayers || evt.status.message_type == PrintStateBase::SlicingNotificationType::SlicingEmptyGcodeLayers) {
notif_level = NotificationManager::NotificationLevel::SeriousWarningNotificationLevel;
}
notification_manager->push_slicing_warning_notification(warning.message, false, model_object, object_id, warning_step, warning.message_id, notif_level);
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/GUI/Widgets/StateHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void StateHandler::update_binds()

void StateHandler::set_state(int state, int mask)
{
if (states_ & mask == state & mask) return;
if ((states_ & mask) == (state & mask)) return;
int old = states_;
states_ = states_ & ~mask | state & mask;
if (old != states_ && (old | states2_) != (states_ | states2_)) {
Expand Down