diff --git a/src/icons/icons.qrc b/src/icons/icons.qrc index 86622eda1..b9668b18b 100644 --- a/src/icons/icons.qrc +++ b/src/icons/icons.qrc @@ -114,7 +114,8 @@ images/m90_24px.png images/m90_24px@2x.png images/move.png - images/move_simple.png + images/move_simple_16px.png + images/move_simple_16px@2x.png images/neutral_12px.png images/neutral_12px@2x.png images/new_folder_16px.png diff --git a/src/icons/images/move_simple.png b/src/icons/images/move_simple.png deleted file mode 100644 index f810ae033..000000000 Binary files a/src/icons/images/move_simple.png and /dev/null differ diff --git a/src/icons/images/move_simple_16px.png b/src/icons/images/move_simple_16px.png new file mode 100644 index 000000000..12e353f8c Binary files /dev/null and b/src/icons/images/move_simple_16px.png differ diff --git a/src/icons/images/move_simple_16px@2x.png b/src/icons/images/move_simple_16px@2x.png new file mode 100644 index 000000000..e75cd0d7a Binary files /dev/null and b/src/icons/images/move_simple_16px@2x.png differ diff --git a/src/icons/svg/move_simple_16px.svg b/src/icons/svg/move_simple_16px.svg new file mode 100644 index 000000000..a97b8302a --- /dev/null +++ b/src/icons/svg/move_simple_16px.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/img/img/ImageLandmarksDialog.ui b/src/img/img/ImageLandmarksDialog.ui index b6e3bb660..b9d16e493 100644 --- a/src/img/img/ImageLandmarksDialog.ui +++ b/src/img/img/ImageLandmarksDialog.ui @@ -166,7 +166,7 @@ Move - :/move_simple.png + :/move_simple_16px.png true diff --git a/src/img/img/imgLandmarksDialog.cc b/src/img/img/imgLandmarksDialog.cc index 7d4c15ce5..b8755adb9 100644 --- a/src/img/img/imgLandmarksDialog.cc +++ b/src/img/img/imgLandmarksDialog.cc @@ -238,6 +238,7 @@ public: double l = double (search_range) / ui ()->mouse_event_trans ().mag (); db::DBox search_box = db::DBox (p, p).enlarged (db::DVector (l, l)); + m_selected = -1; int li = 0; for (std::vector::const_iterator l = mp_image->landmarks ().begin (); l != mp_image->landmarks ().end (); ++l, ++li) { if (search_box.contains (*l)) { @@ -419,7 +420,7 @@ LandmarksDialog::LandmarksDialog (QWidget *parent, img::Object &img) mp_service->updated_event.add (this, &LandmarksDialog::landmarks_updated); new_pb->setChecked (true); - update_mode (); + mp_service->set_mode (Add); landmarks_updated (); } @@ -436,11 +437,11 @@ LandmarksDialog::update_mode () { mode_t new_mode = None; - if (new_pb->isChecked ()) { + if (sender () == new_pb) { new_mode = Add; - } else if (move_pb->isChecked ()) { + } else if (sender () == move_pb) { new_mode = Move; - } else if (delete_pb->isChecked ()) { + } else if (sender () == delete_pb) { new_mode = Delete; }